ts_summary: Summarize a time series dataset

Description Usage Arguments Value

View source: R/summary_stats.R

Description

ts_summary creates a summary of a community time series dataset. The summary contains community-level statistics, including total number of observations, species richness, cross-correlations; as well as summary statistics on the individual populations that make up the community.

Some aspects of the summaries depend on times, which should be a vector of the time index associated with the time series; and effort, which should be a vector of the sampling effort. obs_per_effort is an optional argument for correcting abundance based on effort; by default, it checks if effort is NULL. Interpolation of missing values for autocorrelation calcuations (if needed) is done via interp_method

Usage

1
2
3
4
5
6
7
8
9
ts_summary(
  data,
  times = NULL,
  effort = NULL,
  obs_per_effort = !is.null(effort),
  interp_method = forecast::na.interp,
  include_spp_correlations = TRUE,
  ...
)

Arguments

data

a vector, matrix, or data.frame of numeric observations (within columns) across times (within rows).

times

numeric or Date vector of timestamps of the observations.

effort

numeric vector of effort associated with the observations.

obs_per_effort

logical indicator if obs should be corrected for effort before summaries are done.

interp_method

character a function used to interpolate obs. Defaults to na.interp.

include_spp_correlations

whether to include the calculations of between-species correlations

...

additional arguments to be passed to temp_autocor

Value

ts_summary: list of number of species, number of observations, summaries of the variables, the times, the effort, the species richness, total observation, and the among-species correlation.


weecology/MATSS documentation built on May 15, 2020, 7:03 p.m.