915/how-to-create-a-list-of-data-frames
I want create a list in which I can access the different data frames as a part of list?
Here is the two data frames:
df1<- data.frame(a=c(8,9,10),b=c(11,12,13),c=c(14,15,16)) df2<-data.frame(d=c(17,18,19),e=c(20,21,22),f=c(23,24,25))
Basically all we have to do is to stick to basics:
df1<- data.frame(a=c(8,9,10),b=c(11,12,13),c=c(14,15,16)) df2<-data.frame(d=c(17,18,19),e=c(20,21,22),f=c(23,24,25)) new_list<-list(df1,df2)
new_list[[1]] a b c 1 8 11 14 2 9 12 15 3 10 13 16
You can use reduce set.seed(24) r1 <- map(c(5, 10, ...READ MORE
Use bind_rows() from the dplyr package: bind_rows(list_of_dataframes, .id ...READ MORE
You can parse the strings to symbols. ...READ MORE
You can use pmap as follows: nc <- ...READ MORE
By assuming that all the values are ...READ MORE
You can use dplyr function arrange() like ...READ MORE
It is simple and easy: df1<-as.data.frame(matrix(sample(c(NA, 1:10), 100, ...READ MORE
Easily you can do it: drops <- c("V2","V4") df1[ ...READ MORE
We can easily use this command as.data.frame(lapply(d1, "length< ...READ MORE
it is easily achievable by using "stringr" ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.