[R] Referencing variables in a dataframe.

Brian Quinif bquinif at gmail.com
Fri Apr 7 03:12:45 CEST 2006


I have a question about how to reference variables in a dataframe.

Normally, after I have read in some Stata data using the following command
all <- read.dta('all.dta')

Whenever I want to use the variable "sat.vr1" in the "all" data frame,
I do so using

all$sat.vr1

However, I'd like to be able to use the sat.vr1 variable without the
"all$" (as well as all of the other variables of the dataframe).

Is there some way to make a particular dataframe the "active" or
"default" one so that a can do this?

Thanks,

Brian




More information about the R-help mailing list