[R] Using the value of a variable as a variable

2008-01-30 Thread Ramon Hidalgo
Hello, How can I make the following expressions are equivalent datos$Col1 and datos$var when I define var - Col1? I am trying to get the same result with datos$Col1 [1] 0 1 1 0 1 0 1 1 0 And datos$var NULL Thank's , Ramón [[alternative HTML version deleted]]

Re: [R] Using the value of a variable as a variable

2008-01-30 Thread Ted Harding
On 30-Jan-08 19:47:55, Ramon Hidalgo wrote: Hello, How can I make the following expressions are equivalent datos$Col1 and datos$var when I define var - Col1? I am trying to get the same result with datos$Col1 [1] 0 1 1 0 1 0 1 1 0 And datos$var NULL It will work if you use [],

Re: [R] Using the value of a variable as a variable

2008-01-30 Thread Henrik Bengtsson
On Jan 30, 2008 1:15 PM, Ted Harding [EMAIL PROTECTED] wrote: On 30-Jan-08 19:47:55, Ramon Hidalgo wrote: Hello, How can I make the following expressions are equivalent datos$Col1 and datos$var when I define var - Col1? I am trying to get the same result with datos$Col1 [1] 0 1 1