unique2 {ecospace}R Documentation

Internal Ecospace Functions.


Internal functions not intended to be called directly by users.


unique2(x, length = 1, ...)



a vector or a data frame or an array or NULL.


number of times (default = 1) to repeat the dimensionally shorter state.


arguments for particular methods.


Modified unique function that returns proper number of items for filling of matrix when called within apply.


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.

See Also


[Package ecospace version 1.4.2 Index]