Learn R Programming

rEDM (version 1.2.3)

ccm_means: Take output from ccm and compute means as a function of library size.

Description

ccm_means is a utility function to summarize output from the ccm function. If there is a `model_output` column (e.g. if `ccm()` was run with `stats_only = FALSE`), then that column is dropped before summaries are computed.

Usage

ccm_means(ccm_df, FUN = mean, ...)

Arguments

ccm_df

a data.frame, usually output from the ccm function

FUN

a function that aggregates the numerical statistics (by default, uses the mean)

...

optional arguments to FUN

Value

A data.frame with forecast statistics aggregated at each unique library size

Examples

Run this code
# NOT RUN {
data("sardine_anchovy_sst")
anchovy_xmap_sst <- ccm(sardine_anchovy_sst, E = 3, 
  lib_column = "anchovy", target_column = "np_sst", 
  lib_sizes = seq(10, 80, by = 10), num_samples = 100)
a_xmap_t_means <- ccm_means(anchovy_xmap_sst)
 
# }

Run the code above in your browser using DataLab