please I want to remove just 20 from score.
list1 <- list(numbers=c(1,2),logical=TRUE, strings=c("a","b","c"),score=c(15,20,30))
rm(list=list1[[4]][[2]])
Warning message:
In rm(list = list1[[4]][[2]]) : object '20' not found
list1[[4]][2]
#[1] 20
list1[[4]][2] <- NULL
Error in list1[[4]][2] <- NULL : replacement has length zero