I have a list of dataset names in a list that does not contain actual datasets themselves. How do I assign to a specific dataset another dataset?
Example:
- data[1] contains the name of a dataset1.
- data[2] contains the name of a dataset2.
I want to assign dataset2 to dataset1.
get(data[1]) <- get(data[2]) does not working.
How do I solve the problem?
CodePudding user response:
IF you really, really want to do that you could use assign:
assign(data[1], get(data[2]))
