KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Basic question: In R, how can I make a list and later populate it with vector elements? l <- list() l[1] <- c(1,2,3) This gives the error "number of items to replace is not a multiple of replacement length", so R is trying to unpack the vector. The only way I have found to work so far is to add the vectors when making the list. l <- list(c(1,2,3), c(4,5,6))
Tags (comma-separated)
Save Edits
Cancel