powered by
Keep or drop symbols
keep(a, yes) discard(a, no)
Object of class free
free
Specification of symbols to either keep (yes) or discard (no), coerced to a free object
Robin K. S. Hankin
(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
Run the code above in your browser using DataLab