Learn R Programming

Momocs (version 1.2.9)

select: Select and rename columns by name

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, fac_dispatcher, filter, mutate, rescale, rm_harm, rm_uncomplete, rw_fac, sample_frac, sample_n, slice

Examples

Run this code
# NOT RUN {
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)
head(olea$fac)
# select some columns
select(olea, domes, view)
# remove some columns
select(olea, -ind)
# rename on the fly and select some columns
select(olea, foo=domes)

# }

Run the code above in your browser using DataLab