Trying to store a dataframe into a new one with the name of a variable. Not sure how to code it exactly...
Posting an example below. Goal is to get a dataframe named Flowers with the data from df
df <- data.frame(iris)
x <- "Flowers"
Trying to store a dataframe into a new one with the name of a variable. Not sure how to code it exactly...
Posting an example below. Goal is to get a dataframe named Flowers with the data from df
df <- data.frame(iris)
x <- "Flowers"
I think you want to use
assign(x, df)
Thank you!!!!! That did the trick!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.