[R] Matrix entries not recognised as numeric

snapperball kingsley.oteng at gmail.com
Mon Sep 17 15:18:10 CEST 2007


Hello, 

I am using a number of large matrices in a project. I read a couple of the
matrices using the read.csv command. However in some instances, R does not
recognize the resulting matrices as consisting of numerical values (I
suspect R considers them as strings or factors)

for instance when I try the following command (consider aMatrix is a
matrix), 

> range(aMatrix[,1])

R returns

> NA

I get the same output when I try the max  and min commands. Basically R does
not recognise the matrix as consisting of numerals. However when I inspect
the matrix the entries appear to contain numerical values. 

Is there something I am doing wrong? Is there anyway of coercing R into
recognizing the matrix as consisting of numerals?


-- 
View this message in context: http://www.nabble.com/Matrix-entries-not-recognised-as-numeric-tf4466621.html#a12735603
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list