repeat multiple NULL in R
NULL
has no length:
> length(NULL)
[1] 0
So you can't really insert it into a vector. You can either have NA
in you vectors or have a list with NULL
items.
vec.all = c(rep(NA, 4), rep(2, 4), rep(4, 4))
list.all = c(rep(list(NULL), 4), rep(list(2), 4), rep(list(4), 4))