I have the following list
n = 1:10 s = c("aa", "bb", "cc", "dd", "ee") b = c(TRUE, FALSE, TRUE, FALSE, FALSE) x = list(n, s, b, 3) For a vector v we can remove elements like this: v[-(1:2)]. But how do we go about removing elements from a list? Say that I want x where x[[1]] should now have the last two elements removed - is there an easy way to do this?