On 01/03/12 04:43, John Kane wrote:
(mydata<- as.factor(c("1","2","3", ">2", "5", ">2")))
str(mydata)

newdata<- as.character(mydata)

newdata[newdata==">2"]<- 0
newdata<- as.numeric(newdata)
str(newdata)

We really need to keep Excel (and other spreadsheets) out of peoples hands.

Amen, bro'!!!

    cheers,

        Rolf Turner

______________________________________________
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.

Reply via email to