In R, "double" is a synonym for "numeric".
Please see
?numeric
The details section of ?numeric begins with
Details:
'numeric' is identical to 'double' (and 'real'). It creates a
double-precision vector of the specified length with each element
equal to '0'.
Rich
On Wed, Jul 31, 2013 at 4:47 PM, <[email protected]> wrote:
> 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.
>
> --
> Jessica R.B. Musselman, MS
> T32 Trainee/Doctoral Candidate
> University of Minnesota
> Department of Pediatrics
> Division of Epidemiology/Clinical Research
> Mayo Mail Code 715
> Room 1-195 Moos Tower
> 420 Delaware St. SE
> Minneapolis MN 55455
> Phone: (612)626-3281
> email: [email protected]
>
> ______________________________**________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
> PLEASE do read the posting guide http://www.R-project.org/**
> posting-guide.html <http://www.R-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.