analysis_wrapper: Create a function that replicates an analysis for all time...

Description Usage Arguments Value Examples

View source: R/analysis_wrapper.R

Description

This wrapper takes as input, some analysis function, fun, and returns a function that will run that analysis function on all the time series in a dataset. Some post-processing attempts to handle merging of the output in a sensible way.

Usage

1

Arguments

fun

the analysis function

Value

a function that takes in a dataset and optional arguments, and returns a data.frame or tibble with the combined results, and an "id" column with the name of the species

Examples

1
2
3
4
5
6
## Not run: 
  sgs_data <- MATSS::get_sgs_data()
  summarize_dataset <- analysis_wrapper(ts_summary)
  summarize_dataset(sgs_data)

## End(Not run)

weecology/MATSS-pipeline documentation built on May 16, 2020, 1:54 p.m.