Dear all, I am really new to R, and I have problem here. I searched around, but did not get a solution.
I have a numetrix matrix (20 by 25) saved in .csv. I read it as >sx<-read.csv("sx.csv",header=F) Then I try to convert it to numeric using >sx<-as.numeric(sx) Error: (list) object cannot be coerced to type 'double' The class of sx is "data.frame". I tried to unlist it as, s<-unlist(sx), but when I look at the dimension, > dim(s) NULL Can anyone tell me how should I load my data as a numeric matrix rather than "data.frame", or how to convert the data.frame matrix into numeric? Thank you very much. Wendy -- View this message in context: http://n4.nabble.com/coerce-list-object-to-type-double-tp1562988p1562988.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org 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.