Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #dataframe #list
ADD COMMENT
Topic
Name
8+2 =