How fast did a community change through time, and when did it change fastest? RRatepol estimates the rate of change (RoC) from community data in time series, such as fossil pollen records, together with its uncertainty, and detects the periods of significantly fast change (peak points).

Key features
- Flexible estimation: four smoothing methods, six dissimilarity coefficients, and three kinds of Working Units: individual levels, time bins, or a moving window of bins.
- Uncertainty built in: randomisation runs that draw ages from an age-depth model and rarefy counts to a common total, summarised as the median RoC with its 95 % interval.
- Peak detection: five methods to find periods of significantly fast change, from a simple threshold to non-linear trends and the signal-to-noise index.
-
Reproducible results: a
seedgives the same results in any session and on any number of cores, andcheck_rand()tells you how many randomisation runs are enough. - Scales up: parallel computation on a laptop or an HPC cluster, using only the cores a job is allowed to use.
New in 1.4.0
- User experience: clear messages, warnings, and errors, figures and a website in the colours of the logo, and runnable examples on every help page.
-
Reproducibility: randomisation runs that give the same results on any number of cores, a new
seedargument, and Monte Carlo errors withcheck_rand()to choose the number of runs. - Stability: parallel computation that respects the cores of an HPC job, and settings and inputs that made functions fail are now handled.
Some results change compared with RRatepol 1.3.0; see NEWS for the details before you update.
Installation
Install the latest release from GitHub:
# install.packages("remotes")
remotes::install_github("HOPE-UIB-BIO/R-Ratepol-package")To install a specific version, for example to reproduce an earlier analysis, add its tag:
remotes::install_github("HOPE-UIB-BIO/R-Ratepol-package@v1.3.0")Citation
If you use RRatepol, please cite:
Mottl, O., Grytnes, J.-A., Seddon, A. W. R., Steinbauer, M. J., Bhatta, K. P., Felde, V. A., Flantua, S. G. A., & Birks, H. J. B. (2021). Rate-of-change analysis in palaeoecology revisited: a new approach. Review of Palaeobotany and Palynology, 293, 104483. https://doi.org/10.1016/j.revpalbo.2021.104483
The citation is also available in R:
citation(package = "RRatepol")Learn more
The package website has the help pages of all functions and three articles:
- Package description: the individual steps of the RoC estimation and of peak detection.
- Workflow example: a full analysis, from downloading a record from Neotoma and building an age-depth model to estimating RoC with age uncertainty.
- Parallel computation and HPC: when parallel computation pays off, how to choose the number of runs, and how to run RRatepol on an HPC cluster.
Workshop materials show further settings and data types:
- R-Ratepol workshop with an African focus, for users of the African Pollen Database.
- Oeschger Centre for Climate Change Research workshop, with workflows for geochemistry and XRF data.
To estimate RoC for many records, see FOSSILPOL, an R-based modular workflow that processes multiple fossil pollen records into a standardised dataset compilation, ready for multi-record and multi-proxy analyses at various spatial and temporal scales.
Examples
Built-in example data
Pollen data from four European sequences were obtained from the Neotoma database (Goring et al., 2015). Taxa were standardised to the taxonomically highest pollen morphotype (Level = MHVar2) using the pollen harmonisation table in Giesecke et al. (2019).
Age-depth models were developed using the pre-selected radiometric control points provided in Giesecke et al. (2014) and calibrated the radiocarbon dates using the IntCal13 Northern Hemisphere calibration curve (Reimer et al., 2013). For each sequence, an age-depth model was constructed using the Bchron R package (Haslett & Parnell, 2008) to generate 1000 possible age predictions (i.e. age uncertainties) for all levels. We calculated the median of all the uncertainties for each level to give the most probable age (default age) in calibrated years before present (cal yr BP, where 0 = 1950 CE).
In each sequence, we excluded all levels that contained less than 150 pollen grain counts of the terrestrial taxa, and all levels beyond a 3000-years extrapolation of the oldest chronological control point. In addition, we excluded all levels with an age older than 8500 cal yr BP to focus on the period of most substantial human impact.
example_data <-
RRatepol::example_data
dplyr::glimpse(example_data)
#> Rows: 4
#> Columns: 7
#> $ dataset_id <chr> "4012", "40951", "45314", "17334"
#> $ collection_handle <chr> "DALLICAN", "STEERMOS", "KILOALA", "GL"
#> $ lat <dbl> 60.38736, 47.80567, 67.96611, 53.00735
#> $ long <dbl> -1.096480, 8.200150, 20.460278, -6.348035
#> $ pollen_data <list> [<tbl_df[63 x 51]>], [<tbl_df[273 x 104]>], [<tbl_df…
#> $ sample_age <named list> [<data.frame[63 x 3]>], [<data.frame[273 x 3]>], [<d…
#> $ age_uncertainty <named list> <<matrix[1000 x 63]>>, <<matrix[1000 x 273]>>, <<mat…
example_data %>%
ggplot2::ggplot(
ggplot2::aes(
x = long,
y = lat
)
) +
ggplot2::borders(
fill = "#D7D6D7",
colour = NA
) +
ggplot2::geom_point(
shape = 0,
size = 2,
colour = "#030202"
) +
ggplot2::geom_point(
shape = 20,
size = 2,
colour = "#CC203F"
) +
ggplot2::coord_quickmap(
xlim = c(-10, 25),
ylim = c(47, 70)
) +
ggplot2::labs(
x = "Longitude",
y = "Latitude"
) +
ggplot2::theme_classic()
#> Warning: `borders()` was deprecated in ggplot2 4.0.0.
#> ℹ Please use `annotation_borders()` instead.
Example 1: a single estimate
Estimate RoC for the Dallican Water site, using Shepard’s 5-term filter to smooth the data and the chi-squared dissimilarity coefficient. Pollen counts are not standardised to a common total, and the age uncertainties from Bchron are not used, so a single run is enough.
sequence_01 <-
RRatepol::estimate_roc(
data_source_community = example_data$pollen_data[[1]],
data_source_age = example_data$sample_age[[1]],
smooth_method = "shep",
dissimilarity_coefficient = "chisq",
working_units = "levels"
)
#>
#> ── RRatepol started 2026-12-04 20:32:02 ────────────────────────────────────────
#> ℹ Working Units: individual levels.
#> ℹ Time standardisation: RoC is reported as dissimilarity per 500 years.
#> ✔ RRatepol finished 2026-12-04 20:32:02 [0.59 secs]
RRatepol::plot_roc(
data_source = sequence_01
)
Example 2: age uncertainty and standardised counts
# number of randomisation runs in Examples 2 and 3
n_rand <- 1000Now standardise the pollen counts in each sample to 150 pollen grains and use the age uncertainties from the age-depth model. The process is repeated 1000 times on multiple cores using parallel computation (see Parallel computation and HPC for when and how to use use_parallel), and the seed makes the results reproducible. The figure then shows an uncertainty envelope between the 2.5 % and 97.5 % quantiles of RoC across runs (ROC_dw and ROC_up), the 95 % interval.
sequence_02 <-
RRatepol::estimate_roc(
data_source_community = example_data$pollen_data[[1]],
data_source_age = example_data$sample_age[[1]],
age_uncertainty = example_data$age_uncertainty[[1]],
smooth_method = "shep",
dissimilarity_coefficient = "chisq",
working_units = "levels",
standardise = TRUE,
n_individuals = 150,
rand = n_rand,
use_parallel = TRUE,
seed = 900723
)
#>
#> ── RRatepol started 2026-12-04 20:32:02 ────────────────────────────────────────
#> ℹ Age uncertainty: each run uses one age sequence drawn from `age_uncertainty`.
#> ℹ Working Units: individual levels.
#> ℹ Time standardisation: RoC is reported as dissimilarity per 500 years.
#> ℹ Standardisation: each Working Unit is rarefied to 150 individuals, or to the
#> smallest count in the data if that is lower.
#> ✔ RRatepol finished 2026-12-04 20:32:11 [8.08 secs]
RRatepol::plot_roc(
data_source = sequence_02
)
Example 3: binning with a moving window
Use binning with a moving window with bin_size = 500 and number_of_shifts = 5.
sequence_03 <-
RRatepol::estimate_roc(
data_source_community = example_data$pollen_data[[1]],
data_source_age = example_data$sample_age[[1]],
age_uncertainty = example_data$age_uncertainty[[1]],
smooth_method = "shep",
dissimilarity_coefficient = "chisq",
working_units = "MW",
bin_size = 500,
number_of_shifts = 5,
standardise = TRUE,
n_individuals = 150,
rand = n_rand,
use_parallel = TRUE,
seed = 900723
)
#>
#> ── RRatepol started 2026-12-04 20:32:11 ────────────────────────────────────────
#> ℹ Age uncertainty: each run uses one age sequence drawn from `age_uncertainty`.
#> ℹ Working Units: moving-window binning with 500-year bins and 5 shifts of the
#> window.
#> ℹ Bin selection: one sample at random in each bin.
#> ℹ Time standardisation: RoC is reported as dissimilarity per 500 years.
#> ℹ Standardisation: each Working Unit is rarefied to 150 individuals, or to the
#> smallest count in the data if that is lower.
#> ✔ RRatepol finished 2026-12-04 20:32:31 [19.93 secs]
RRatepol::plot_roc(
data_source = sequence_03
)
Example 4: peak points
Detect the peak points with the trend_non_linear method.
sequence_03_with_peaks <-
RRatepol::detect_peak_points(
data_source = sequence_03,
sel_method = "trend_non_linear"
)
RRatepol::plot_roc(
data_source = sequence_03_with_peaks,
peaks = TRUE,
trend = "trend_non_linear"
)
Example 5: are 1000 runs enough?
check_rand() uses the Monte Carlo errors returned by estimate_roc() to recommend the number of randomisation runs: the number at which the Monte Carlo errors of the median RoC and of its 95 % interval are below 10 % of the interval width in 90 % of the Working Units.
rand_check <-
RRatepol::check_rand(
data_source = sequence_02
)
#> ℹ Monte Carlo error assessed in 62 of 62 Working Units. With 1000 runs, it
#> exceeds 10 % of the 95 % interval width in 14 of them. Recommended number of
#> randomisation runs (`rand`): 1300.
rand_check$rand_recommended
#> [1] 1300Here, check_rand() recommends 1300 runs. When this is more than the runs used, run estimate_roc() again with rand set to the recommended number.
Acknowledgements
The original sketch for the logo was drawn by Vanesa Surtkova. Check her out!
