Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

chgr

Absolute change between the year


Description

Function for generating the n-period absolute change

Usage

chgr(x, n = 1)

Arguments

x

The time series for the change to be calculated.

n

The period for the growth to be calculated over.

Details

In order to ensure the change calculated is reliable, the following rule are applied.

  1. 50% of the data must be present.

  2. The length of the time series must be greater than n

Otherwise the growth will not be computed.

Value

The n-period change of the time series.

Examples

test.ts = abs(rnorm(100))
chgr(test.ts, 1)
chgr(test.ts, 3)
chgr(test.ts, 10)

FAOSTAT

Download Data from the FAOSTAT Database

v2.2.1
GPL (>= 2)
Authors
Michael C. J. Kao <michael.kao@fao.org>, Markus Gesmann, Filippo Gheri
Initial release
2020-11-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.