I have a data frame, 'mydata':
head(mydata)
ID MDC
000001 21A
000002 5
000003 8
...
I've split my data frame by one of it's column values, namely 'MDC'. This created a list, subdivided into further lists by the column value 'MDC':
mylist <- split(mydata, mydata$MDC, drop=TRUE)
summary(mylist)
Length Class Mode
0 75 data.frame list
1 75 data.frame list
10 75 data.frame list
11 75 data.frame list
12 75 data.frame list
21A 75 data.frame list
...
I now want to create a data frame for each MDC with the corresponding name, e.g. 'MDC1'.
How can I assign the MDC values to the list elements?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…