[R] double matrix?

Rui Barradas ruipbarradas at sapo.pt
Wed Jul 31 23:53:19 CEST 2013


Hello,

"double" and "numeric" are the same. From the help page for ?double, 
section "Note on names"

"It is a historical anomaly that R has two names for its floating-point 
vectors, double and numeric (and formerly had real)."

Apparently you are successfully converting characters to double 
precision floating-point numbers.

Hope this helps,

Rui Barradas


Em 31-07-2013 21:47, bruce087 at umn.edu escreveu:
> Hi-
>
> I have a 37 X 473971 character matrix that I am trying to convert into a
> numeric matrix. When I use the code:
>
> class(matrix) = "numeric"
> I end up with something called a "double matrix" whose dimensions are
> still 37 X 473971
>
> I have also tried
> new = apply(matrix,2, as.numeric) and got the same thing.
>
> The analysis code I am ultimately attempting to run on this data
> requires that it be in a numerical matrix, and it is really not okay
> with a double matrix.
>
> Does anyone know how to fix this?
>
> Thanks.
>



More information about the R-help mailing list