Make a used-available data frame from a presence-absence type data.
Usage
makeUsedAvail(x, ...)
# S3 method for default
makeUsedAvail(x, y, ...)
# S3 method for formula
makeUsedAvail(formula, data = parent.frame(), ...)
Value
The function returns a data frame, where used and available portions of
the input data are bound on top of each other, the first column
refers to y, where used (1) and available (0) locations are
indicated different from the input values.
All locations in the input data are treated as available (0),
while only nonzero observations in y are treated as used (1).
Arguments
x
a matrix or data frame.
y
a vector with 0/1 entries, 1s are taken as used observations.