calcAddVariable: Calculate new variable

View source: R/calcAddVariable.R

calcAddVariableR Documentation

Calculate new variable

Description

Calculate new variable from existing ones, using a generic formula.

Usage

calcAddVariable(data, formula, newUnit = "None", na.act = "no")

Arguments

data

A data frame with columns "variable", "unit" and "value".

formula

An object of class formula, as returned by stats::formula().

newUnit

Character vector with the unit for the newly calculated variable.

na.act

Indicates how NAs in the wide data frame should be handled. Default "no" indicates no action is takenl.

Details

Obsolete. This function will be removed in the near future. Use calc_addVariable() instead.

Value

A data frame with the original and the new variables.

Author(s)

Anselm Schultes, Michaja Pehl

See Also

calc_addVariable()

Examples




pik-piam/quitte documentation built on April 26, 2024, 12:58 a.m.