Learn R Programming

Momocs (version 1.1.6)

select: Selects (ala dplyr) on Momocs objects

Description

Select variables by name, from the $fac. See examples and ?dplyr::select.

Usage

select(.data, ...)

Arguments

.data
a Coo, Coe, PCA object
...
comma separated list of unquoted expressions

Value

a Momocs object of the same class.

Details

dplyr verbs are maintained.

See Also

Other handling functions: arrange, at_least, chop, combine, dissolve, filter, mutate, rename, rm_uncomplete, rw_fac, sample_frac, sample_n, slice, subset.Coo, transmute

Examples

Run this code
data(olea)
olea
select(olea, var, view) # drops domes and ind
select(olea, variety=var, domesticated_status=domes, view)
# combine with filter with magrittr pipes
# only dorsal views, and 'var' and 'domes' columns
filter(olea, view=="VD") %>% select(var, domes)

Run the code above in your browser using DataLab