[R] double matrix?

David Carlson dcarlson at tamu.edu
Wed Jul 31 23:54:35 CEST 2013

It is hard to understand that your R code will not work with a
double matrix since double is just short for double precision
floating point matrix. Your only alternative would be integer.

>From ?numeric

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

"double is the name of the type. numeric is the name of the
mode and also of the implicit class."

David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: r-help-bounces at r-project.org
[mailto:r-help-bounces at r-project.org] On Behalf Of
bruce087 at umn.edu
Sent: Wednesday, July 31, 2013 3:48 PM
To: r-help at r-project.org
Subject: [R] double matrix?


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 

Does anyone know how to fix this?


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: bruce087 at umn.edu

R-help at r-project.org mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible

More information about the R-help mailing list