set_extrapolation_years_nearest: Set the number of years to fill out using nearest available...

View source: R/setter_funcs.R

set_extrapolation_years_nearestR Documentation

Set the number of years to fill out using nearest available data

Description

Sets the number of years to fill out using nearest available data at dataset edges, as a means of extrapolation. Turns extrapolation on if it isn't already. Overrides the number of years to linearly extrapolate if set.

Usage

set_extrapolation_years_nearest(session, years)

Arguments

session

A valid GDL session object to interface with.

years

Number of years to copy (integer)

Value

An amended GDL session object.

Examples

## Not run: 
# Create a session using your API token (provided by environment here)
session <- gdl_session(Sys.getenv('GDL_API_TOKEN'))
session <- set_extrapolation_years_nearest(session, 3)

## End(Not run)

gdldata documentation built on Sept. 21, 2023, 1:07 a.m.