Re: [Rd] How to set values

From: jorgeA <>
Date: Tue, 27 Sep 2011 11:38:13 -0700 (PDT)

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:
Sent from the R devel mailing list archive at

______________________________________________ mailing list
Received on Wed 28 Sep 2011 - 08:28:08 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 28 Sep 2011 - 11:50:35 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive