add a comment making it clear why we set the ndims variable

`ndims` must be set to 1 for the single scalar case because we need to
tell R that there is a single number to hold in a SEXP.