R package to standardise statistical analyses of time series in the CoClime project.
The package is not on CRAN. Install it with
# if needed install.packages("remotes") # then remotes::install_github("jiho/coclimer")
Load the package
library("coclimer")
A test dataset is included in the package, containing the concentration of Ostreopsis ovata in two forms and environemental variables. Read more about it with
?ost
Make it available and inspect it with
data(ost) head(ost)
Your data should be made to look the same: a date
column, columns for species concentrations/abundances, columns for environmental variables.
Functions plot_multi()
and plot_seasonnal()
allow to represent the data of multiple series graphically
# full time series plot_multi(ost, benthic:planktonic) plot_multi(ost, benthic:planktonic, trans="sqrt") # seasonal view plot_seasonal(ost, benthic:planktonic, trans="sqrt")
The function yearly_stats()
allows to compute standardised statistics for each year.
# for benthic concentration yearly_stats(ost$date, ost$benthic, bloom_threshold=200000)
To regress abundances of HAB-forming organisms on environmental variables, use the function relate_env()
. This computes a quantile-based regression of abundances on all environmental variables using the Random Forest algorithm, computes partial dependence plots for the most relevant variables and plots them.
suppressMessages(library("tidyverse")) d <- filter(ost, benthic>0) %>% as.data.frame() relate_env(sqrt(d$benthic), select(d, chla:temperature), n=3)
Read the help of each function for more information.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.