extract_niche_size {nichetools} | R Documentation |
Description
Extract niche size based on elliptical niche region of Bayesian estimates of
sigma created by function niw.post()
or siberEllipses()
in the package
nicheROVER or
SIBER, respectfully.
For nicheROVER
this function is a wrapper around nicheROVER::niche.size
.
Usage
extract_niche_size(
data,
pkg = NULL,
name = NULL,
prob = NULL,
community_df = NULL
)
Arguments
|
a list or matrix created by the function niw.post() or
siberEllipses() in the package
nicheROVER or
SIBER, respectfully.
|
|
a character string that is the name of the package that
you're using. Defaults to "nicheROVER" .
Alternatively the user can supply the argument with "SIBER" .
|
|
a character string that will be assigned as the column name for
groups. Default is sample_name . Only to be used when pkg is set to
"nicheROVER" .
|
|
a numeric bound by 0 and 1 indicating the
probabilistic niche size. Default is 0.95. Only to be used when pkg is set to
"nicheROVER" .
|
|
a four column data frame. One of the columns has to be named
community and the data in the column will be numeric as a character
string(e.g., "1", "2", "3" ). This is the order of the community names
and will be used to join the actual community names to the correct data.
These are the same class and values required by the function, createSiberObject()
from SIBER.
The second column will be the names of the groups that are needed to supply
required by the function, createSiberObject()
from SIBER.
The third and fourth columns contains the actual names of the communities
and groups the user is working with (e.g., "region" , "common_name" ).
|
Value
if pkg
is set to "nicheROVER"
then a tibble
containing three rows, sample_name
, id
, and niche_size
is returned.
See Also
nicheROVER::niche.size()
, nicheROVER::niw.post()
,
SIBER::siberEllipses()
, and SIBER::createSiberObject()
Examples
extract_niche_size(data = niw_fish_post)
[Package
nichetools version 0.3.1
Index]