Keep or drop symbols
keep(a, yes)
discard(a, no)
Object of class free
Specification of symbols to either keep (yes) or discard (no), coerced to a free object
# NOT RUN { x <- rfree(10,5,8) keep(x,abc(4)) # keep only symbols a,b,c,d discard(x,as.free('cde')) # drop symbols c,d,e x[1:4] %<>% keep(alpha(3)) # keep only abc in first 4 elements of x # }