Description Usage Arguments Value Note Examples
View source: R/applyHeatwaves.R
This function will take a user-specified function and apply it across
all the extreme event files created by gen_hw_set
.
It will generate either a single value for every ensemble member within
every climate model, if city_specific
is set to FALSE
, or
a value for every city for every ensemble member, if
city_specific
is set to TRUE
.
1 | apply_all_models(out, FUN, city_specific = FALSE, ...)
|
out |
Character string with pathname to which extreme event files were
written by |
FUN |
A character string with the name of a function to apply to
the extreme event dataframes located in the directory specified by
|
city_specific |
TRUE or FALSE, specifying whether the function should be applied separately for each study location. |
... |
Optional arguments to |
A dataframe with the value output by the FUN
function, as
applied to all the extreme event dataframes generated by gen_hw_set
.
The function input as FUN
must follow a very specific
structure. It most have as an argument a dataframe with characterized
extreme events, as generated by the gen_hw_set
function.
See the futureheatwaves
vignette for more guidance on creating and
applying a custom function to explore the extreme events identified and
characterized by gen_hw_set
.
1 2 3 4 5 | ex_results <- system.file("extdata/example_results",
package = "futureheatwaves")
apply_all_models(ex_results, FUN = average_mean_temp)
apply_all_models(ex_results, FUN = average_mean_temp,
city_specific = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.