Re: [R] More basic question

2009-06-11 Thread milton ruser
Hi there, It may works: df$myvar<-as.numeric(as.character(df$myvar)) bests milton brazil=toronto On Thu, Jun 11, 2009 at 7:37 PM, Payam Minoofar wrote: > I have encountered a more fundamental problem in my data set. I'm using > read.csv, and all the data are imported as character. How do I do

[R] More basic question

2009-06-11 Thread Payam Minoofar
Never mind the query regarding setting attributes. I just found the relevant section in the manual. The only remaining question is regarding doing string comparisons in sapply argument below. Thank you. Payam I have encountered a more fundamental problem in my data set. I'm using read.csv, a

[R] More basic question

2009-06-11 Thread Payam Minoofar
I have encountered a more fundamental problem in my data set. I'm using read.csv, and all the data are imported as character. How do I do a string comparison in a line like this: M10[ !sapply(1:10, function(x)666 %in% M10[x,]), ] Alternately, how do I change the class type on a column in a data