[R] Referencing data frames

Duncan Murdoch murdoch at stats.uwo.ca
Sat Jun 13 00:03:26 CEST 2009


On 12/06/2009 6:00 PM, Payam Minoofar wrote:
> Hi,
> 
> How do I use the string content of a string variable to reference a data frame of the same name? I want to do the typical tasks of 1) building a name with a string variable and using the string variable to create a data frame (or any object) whose name is the string value of the variable and 2) pass on a string to a function as a parameter, and then use that string to refer to an existing data frame.
> 
> Thanks in advance.

assign() and get() do the basic bits.  They aren't specific to dataframes.

Duncan Murdoch

> 
> Payam
> --
> Payam Minoofar, Ph.D.
> Scientist
> Meissner Filtration Products
> 4181 Calle Tesoro
> Camarillo, CA 93012
> USA
> +1 805 388 9911
> +1 805 388 5948 fax
> Payam.minoofar at meissner.com
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list