How do you create a list with a single value in R? For example, I want a list of 50 zeros. What is the easiest way to define this?
Maybe
res <- list(rep(0,50))
is all you need?