make_epochs: Generate a tibble of epochs.

View source: R/make_epochs.R

make_epochsR Documentation

Generate a tibble of epochs.

Description

Generate a tibble of epochs.

Usage

make_epochs(
  start_year = 1987,
  end_year = 2020,
  epoch_step = 5,
  epoch_overlap = TRUE
)

Arguments

start_year

Minimum year in epochs

end_year

Maximum year in epochs

epoch_step

Numeric. How many years in an epoch?

epoch_overlap

Logical. Should epochs overlap by one year? i.e. epoch_step = 10 with epoch_overlap = TRUE gives, say, 2000-2010 and 2010-2020 whereas epoch_overlap = FALSE gives 2000-2009 and 2010-2019.

Value

Tibble with columns

start

First year of epoch

end

Last year of epoch

years

List column containing the years for the epoch

epoch

Last two digits of first year and last year in epoch. e.g. 10-19.

data

List column of full path of raster files to summarise.

Examples

now <- as.numeric(format(Sys.Date(), "%Y"))
make_epochs(now - 30, now, 10)
make_epochs(now - 30, now, 10, F)


Acanthiza/envFunc documentation built on Aug. 19, 2024, 4:50 a.m.