[R] simple question about variables....

From: Stéphane Cruveiller <scruveil_at_genoscope.cns.fr>
Date: Thu 13 Jul 2006 - 17:53:32 EST


Dear R users,

I have a simple question on variable manipulation. Imagine I have an object "OBJ" that has "toto" as one of its variables. I would like to understand why if I do

> varname <- "toto"

>OBJ$varname returns no results

whereas

> OBJ[varname] returns the column entitled
"toto"

Thanks for your help.

Stéphane.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 13 17:56:39 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 13 Jul 2006 - 20:13:11 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.