get_index: Create a statistical index from a numeric vector given a...

Description Usage Arguments Value

View source: R/indices.R

Description

Creates a statistical index from a numeric vector given a baseline vector index or a baseline value.

Usage

1
get_index(data, base = 100, basepos = 1, baseval = NULL)

Arguments

data

A numeric vector containing values to be expressed as an index.

base

The baseline value of the created index. The default is 100. The base must be a positive number greater than zero.

basepos

The vector index of the value to be used as the baseline for calculating the index. The default is 1. The value at basepos must not be zero. This argument is ignored if the base value is set explcitly with baseval.

baseval

Specifies explicitly the value to use as the baseline when calculating the index. Use this if the baseline value to be used is not represented in the vector. The default is NULL, which means the function will use the value in the basepos instead. The baseline value must not be zero.

Value

A vector containing the created index.


olihawkins/cltools documentation built on Sept. 14, 2020, 7:25 a.m.