freegroup (version 1.1-0)

keep: Keep or drop symbols

Description

Keep or drop symbols

Usage

keep(a, yes)
discard(a, no)

Arguments

a

Object of class free

yes,no

Specification of symbols to either keep (yes) or discard (no), coerced to a free object

Examples

# 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



# }