extract_sigma {nichetools}R Documentation

extract \Sigma

Description

Extract Bayesian estimates of \Sigma from data objects created by nicheROVER or SIBER.

Usage

extract_sigma(
  data,
  pkg = NULL,
  isotope_a = NULL,
  isotope_b = NULL,
  data_format = NULL
)

Arguments

data

a list created by the function niw.post() or siberMVN() in the package nicheROVER or SIBER, respectfully.

pkg

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".

isotope_a

a character string to change the column name of the first isotope used in the analysis. Defaults to "d13c".

isotope_b

a character string to change the name of second isotope used in the analysis. Defaults to "d15n".

data_format

a character string that decides whether the returned object is in long or wide format. Default is "wide", with the alternative supplied being "long".

Value

Returns a tibble of extracted estimates of \Sigma created by the function niw.post() or siberMVN() in the packages nicheROVER. and SIBER.

The returned object will contain five columns in the following order when data_format is set to "wide", metric, id, sample_name, isotope, sample_number, and the posterior sample for \Sigma (e.g., d13c and d15n).

See Also

nicheROVER::niw.post() and SIBER::siberMVN()

Examples

extract_sigma(
data = niw_fish_post
)

extract_sigma(
data = post_sam_siber,
pkg = "SIBER"
)


[Package nichetools version 0.2.0 Index]