freegroup (version 1.1-8)

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

Author

Robin K. S. Hankin

Examples

Run this code
(x <- rfree(20,5,8))

keep(x,abc(4))           # keep only symbols a,b,c,d
discard(x,as.free('cde'))   # drop symbols c,d,e

keep(x,alpha(3))  # keep only abc 

Run the code above in your browser using DataLab