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

indConstruct

Construct indices


Description

A function for constructing indices

Usage

indConstruct(data, origVar, newVarName = NA, baseYear = 2000)

Arguments

data

The data frame containing the data

origVar

The variable in which the indices is to be computed

newVarName

The name assigned to the new variable, if missing then .SC/.SH/.GR/.CH/.IND will be appended depending on the type of construction.

baseYear

The year which will serve as the base

Value

The indice

Examples

test.df = data.frame(FAOST_CODE = rep(1, 100), Year = 1901:2000,
                      test = 1:100)
indConstruct(test.df, origVar = "test", baseYear = 1950)

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.