filter | R Documentation |
Return shapes with matching conditions, from the $fac
. See examples and ?dplyr::filter
.
filter(.data, ...)
.data |
a |
... |
logical conditions |
dplyr verbs are maintained. You should probbaly not filter on PCA objects. The latter are calculated using all individuals and filtering may lead to false conclusions. If you want to highlith some individuals, see examples in plot_PCA.
a Momocs object of the same class.
Other handling functions:
arrange()
,
at_least()
,
chop()
,
combine()
,
dissolve()
,
fac_dispatcher()
,
mutate()
,
rename()
,
rescale()
,
rm_harm()
,
rm_missing()
,
rm_uncomplete()
,
rw_fac()
,
sample_frac()
,
sample_n()
,
select()
,
slice()
,
subsetize()
olea
# we retain on dorsal views
filter(olea, view=="VD")
# only dorsal views and Aglan+PicMa varieties
filter(olea, view=="VD", var %in% c("Aglan", "PicMa"))
# we create an id column and retain the 120 first shapes
olea %>% mutate(id=1:length(olea)) %>% filter(id > 120)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.