popone,list-method: Remove and return an element from a list
Description
Remove and return an element from an R object, given name or index.
Default: the last element
Note: the R object is altered in place, like Python List pop()
ll <- list(1,2,3,a=4,b=5,6,7,c=8,9)
popone(ll,"a")
popone(ll,1) ## remove the 1st in llpopone(ll,1) ## remove the next (2nd of the origin)try(popone(list(),"a"))