r - How to Convert a List of Dataframes to a List of Lists? -
i want change list of dataframes list of lists able add , remove elements dataframes.i want end like:
example:
> list <- list(list("p"=runif(5), "n"=round(1000*rnorm(5,5,2))), list("p"=runif(10), "n"=round(1000*rnorm(10,5,2))), list("p"=runif(15), "n"=round(1000*rnorm(15,5,2))) ) > class(list[[1]]) [1] "list"
since question isn't clear enough me, guess have this:
list <- list(data.frame(a=1:4, b=4:1), data.frame(a=2:6, b=6:2)) which list of data.frames , wnat list:
unlist(lapply(list, as.list), recursive=false) or list of lists
lapply(list, as.list)
Comments
Post a Comment