rm_uncomplete | R Documentation |
Imagine you take three views of every object you study. Then, you can slice, filter or chop your entire dataset, do morphometrics on it, then want to combine it. But if you have forgotten one view, or if it was impossible to obtain, for one or more objects, combine will not work. This function helps you to remove those ugly ducklings. See examples
rm_uncomplete(x, id, by)
x |
the object on which to remove uncomplete "by" |
id |
of the objects, within the $fac slot |
by |
which column of the $fac should objects have complete views |
a Momocs object of same class
Other handling functions:
arrange()
,
at_least()
,
chop()
,
combine()
,
dissolve()
,
fac_dispatcher()
,
filter()
,
mutate()
,
rename()
,
rescale()
,
rm_harm()
,
rm_missing()
,
rw_fac()
,
sample_frac()
,
sample_n()
,
select()
,
slice()
,
subsetize()
# we load olea
data(olea)
# we select the var Aglan since it is the only one complete
ol <- filter(olea, var == "Aglan")
# everything seems fine
table(ol$view, ol$ind)
# indeed
rm_uncomplete(ol, id="ind", by="view")
# we mess the ol object by removing a single shape
ol.pb <- slice(ol, -1)
table(ol.pb$view, ol.pb$ind)
# the counterpart has been removed with a notice
ol.ok <- rm_uncomplete(ol.pb, "ind", "view")
# now you can combine them
table(ol.ok$view, ol.ok$ind)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.