Answers for "how to set a dataframe as a value in a list in r"

R
0

how to set a dataframe as a value in a list in r

mylist <- list()
mylist[[1]] <- mtcars
mylist[[2]] <- data.frame(a = rnorm(50), b = runif(50))
# the key is the [["name"]] that saves all the row (the ["name"] defaults the first)
Posted by: Guest on April-18-2021

Code answers related to "how to set a dataframe as a value in a list in r"

Browse Popular Code Answers by Language