Learn R Programming

amt (version 0.2.2.0)

ua_distr: Summarize distribution of used and available

Description

Internal function to summarize distribution of numeric or factor variables

Usage

ua_distr(name, type, data, lims, resp, n_dens, avail = TRUE)

Arguments

name

[character] Name of the column to summarize.

type

[character] Either "numeric" or "factor" as returned by prep_test_dat().

data

[data.frame] The data.frame containing the columns and the response variable.

lims

[numeric(2)] A numeric vector of length 2 containing the range for the density calculation for all variables where type == "numeric" as returned by prep_test_dat(). Will be passed to stats::density.default() arguments from and to.

resp

[character] Name of the response variable.

n_dens

[numeric] A numeric vector of length 1 giving the number of equally spaced points at which density (used, available, and sampled) is estimated. Passed to stats::density.default(), which indicates that n should usually be specified as a power of 2.

avail

[logical] Should distribution be calculated for the available locations? Defaults to TRUE, but should be false when summarizing the bootstrapped "used" samples.