unique2 {ecospace} | R Documentation |
Internal Ecospace Functions.
Description
Internal functions not intended to be called directly by users.
Usage
unique2(x, length = 1, ...)
Arguments
x |
a vector or a data frame or an array or NULL. |
length |
number of times (default = 1) to repeat the dimensionally shorter state. |
... |
arguments for particular methods. |
Details
Modified unique
function that returns proper number of items for
filling of matrix when called within apply
.
Note
When dealing with ecospace frameworks with multistate binary (numeric)
character types and characters weighted by supplied species pools,
sometimes all species will share the same state value for one of several
states. (For example, perhaps all species are capable of sexual
reproduction, but there is variation in whether some are exclusively sexual
and some are hermaphroditic.) When this occurs, calling apply
when
choosing possible ecospace states will 'break the dimensionality' of the
character matrix and convert it into a list. This function maintains matrix
dimensionality, by repeating the dimensionally shorter unique state
sufficient times to maintain equal length as found in other states.