Hello R list.  I'm very new.  I have what I hope is a simple question that I 
have not been able to find a good solution for.
If this is common and clutters anyone's inbox my most sincere apologies in 
advance...

I am trying to use an argument from a function in the name of a data.frame.  
But I seem to only be able to reference the arguments from the right hand side 
of the <- .

So something like this.  I would just want the function below to create a new 
data.frame named "myDataSet". 
Done on its own like "myDataSet <- data.frame()"

myFunction <- function(x){       # suppose x is just a collection with one 
value with is the name I want the data.frame create as.. c("myDataSet") for 
example
        name(x) <- data.frame()
}

But this of course doesn't work because I have not figured out how to reference 
the function argument from the left hand side of the <- .  
I have read about the "assign" function but from what I can tell (granted I'm 
new to R) the assign function works on the variable names not data.frame names 
which is what I need.

Ultimately what I'm trying accomplish to send a list of character strings then 
iterate it and create multiple new data.frames each having the name of one of 
the elements of the list passed to the function.

If there is even a better article out on the web that I'm obviously missing 
please orient me.   I have struck out so far but I know I may not be searching 
correctly either. 
Any help at all would be much appreciated...
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to