trendOnce: Trend Once

Description Usage Arguments Details Value

Description

"Trending" the data refers to carrying over past values. For example, trending c(1,2,NA,3) would yield c(1,2,2,3). However, missing values are only replaced if their corresponding symbols are "T" or "C".

Usage

1
trendOnce(Num, Symb, applyIndex = 1:length(Num), transfer = FALSE)

Arguments

Num

A vector of numeric values to be trended.

Symb

A vector of the same length as Num containing the symbols (or "flags") for the observations in Num.

applyIndex

This argument allows the user to restrict which values can be trended. By default, all values are included.

transfer

Should the symbol be converted by the function transferSymb.

Details

This function trends the passed data (Num) assuming a vector of symbols (Symb). The "transfer" argument allows the user to specify if the symbol should also be transferred when the number is copied forward.

Value

A list containing the values and symbols after the trending has occurred.


SWS-Methodology/faoswsAupus documentation built on May 9, 2019, 11:45 a.m.