Skip to contents

Calculate recent trends from annual kelp area time series

Usage

get_recent_trend(
  annual_time_series,
  ...,
  ref_year = NULL,
  num_recent_years = 5
)

Arguments

annual_time_series

Annual time series generated by extract_time_series(). Does not work with quarterly time series

...

These dots are for future extensions and must be empty.

ref_year

Reference year or years from which to calculate the recent trend. Years included in the recent trend are ref_year - num_years, inclusive

num_recent_years

Number of years before ref_year to include in recent trend

Value

A data frame with the recent trend calculated by Segment_ID and ref_year. If ref_year is a vector of years, then all recent trend data is collected into a single dataframe in long format with columns for Segment_ID, year, cumulative_coverage, and delta