Hi R-users

 

I am having troubles accessing elements after the $ symbol. Reproducible
example:

 

>test <- data.frame (first=1:10, second=11:20, third=21:30)

>test$first #this works fine

 

but when I try

 

>interest <- "first" 

>test$interest # does not seem to work

 

Could you tell me why that happens and show how to do instead?

 

Thanks so much 

Lorenzo

 

 


	[[alternative HTML version deleted]]

