On 24 May 2011, at 10:20 PM, Lutz Fischer wrote: > n<-data.matrix(s); > > s[1,2] > [1] 30.94346629 # 3136 Levels: 0.026307482 > turned into: > > n[1,2] > [1] 3020
Dear Lutz, “3020” is the factor level associated with 30.94346629, in turn generated by importing with strings in the column Try passing "na.strings = ’n/a’ “ into the read.xls function to avoid the problem If not, then as.numeric(as.character(datafulloffactors) will work as.numeric sees the factor levels: as.character forces as.numeric to see the “labels” t ______________________________________________ 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.