I have made a simulation program in R. My output is a dataframe that includes a coloum with names. I want to store new dataframes with each individual row from the output dataframe. The new dataframes should be named equal to the name colum. The names in the output could change for each simulation I do. Thus, I wonder if it is possible to automaticly, where I do not need to specify the names in the r code?
So, here is my output:
df <- data.frame(Name= c("Marta", "Per", "Charleen"), x=c(1, 2, 3), y=c(5, 0, 9) )
Then I want to have three dataframes named Marta, Per and Charleen like this:
Marta <- c("Marta", 1, 5)
Per <- c("Per", 2, 0)
Charleen <- c("Charleen", 3, 9)
I am very thankful for all help!