Reputation: 3983
I want to make the value of a list element equal to another list, like so...
list_one <- as.list(c(A = NA, B = NA))
list_two <- as.list(c(C = 4, D = 5))
list_one['A'] <- list_two
This is throwing the following warning:
Warning message:
In list_one["A"] <- list_two :
number of items to replace is not a multiple of replacement length
How do I properly make list_two
a sub-list of list_one
so that I don't get this warning?
Upvotes: 0
Views: 65