lhs.filter.anv {tlocoh} | R Documentation |
Define subsets of hulls based on an ancillary variable
lhs.filter.anv(lhs, id = NULL, k = NULL, r = NULL, a = NULL, s = NULL, hs.names = NULL, anv.var = NULL, anv.val = NULL, label = NULL, col = NULL, status = TRUE)
lhs |
A |
id |
The name(s) of the individual(s) to include. Character vector or comma-delimited character. |
k |
The k value of hullsets to include |
r |
The r value of hullsets to include |
a |
The a value of hullsets to include |
s |
The s value of hullsets to include |
hs.names |
The name(s) of saved hullsets to include |
anv.var |
The name of a single ancillary variable in the LoCoH-hullset object |
anv.val |
The value(s) of the ancillary variable that define each group |
label |
Character vector for the labels for each subset. If omitted the value of the ancillary variable will be used |
col |
Vector of color values (one per group). If omitted colors drawn from a rainbow pallete will be used |
status |
Show status messages. T/F |
This will return a list that defines subsets of hulls based on the hull parent point's value of an ancillary variable.
This can be passed to several functions, including plot.locoh.lhs
(future),
and lhs.plot.scatter
, to create plots of subsets of hulls.
anv.val
is a vector of values of anv.var
that will be used to define the group(s). For a hull to be included in a group,
its value of anv.var
must equal one of the values in anv.val
. If anv.val
is omitted,
one group will be created for each unique value of anv.var
. Defining groups based on a range of values (lower and upper limits) is not yet supported,
but you could create a new ancillary variable that classifies ranges of values into discrete groups.
Note that this function can only return subsets for *one* hullset. This means that either lhs
must contain a single
hullset, or other parameters (e.g., id
, hs.names
, k
, r
, and/or a
) are passed to select
one and only one of the hullsets in lhs
.
A list that defines subsets of hulls, with one element for each region in hsp
. Each element is a list with three elements:
indices of the hull parent points
the label for the subset
the color