I have a list and I want to remove a single element from it. How can I do this?
I\'ve tried looking up what I think the obvious names for this function would be in
Just wanted to quickly add (because I didn't see it in any of the answers) that, for a named list, you can also do l["name"] <- NULL. For example:
l["name"] <- NULL
l <- list(a = 1, b = 2, cc = 3) l['b'] <- NULL