[Rd] How to set values

jorgeA thetroopermail at gmail.com
Tue Sep 27 20:38:13 CEST 2011


I'm not sure if I have understood your question, so I will put two
possibilities: 

1 - You have a variable called X ="0" and a variable called Y = "12" and
want that to be numeric. You can do this: 

X <- as.numeric(X) 
Y <- as.numeric(Y) 

2 - You have a variable called XY = "0","12" and want to make a list of
numeric. Then you can do something like this: 

XY <- as.numeric(unlist(strsplit(XY, ","))) 

I hope this helps, 

Best regards 
Jorge Aikes Junior

--
View this message in context: http://r.789695.n4.nabble.com/How-to-set-values-tp3823290p3848526.html
Sent from the R devel mailing list archive at Nabble.com.



More information about the R-devel mailing list