Diff.Col: Difference of Subset Columns

View source: R/data_functions.R

Diff.ColR Documentation

Difference of Subset Columns

Description

This function takes the difference of specified columns in a ts object. It should not be used for taking differences of all variables. Only a subset of variables can be used. Other variables are bind to the differenced data at the end.

Usage

Diff.Col(Data, Diff.ColNames)

Arguments

Data

ts object.

Diff.ColNames

character. Name of the columns to be differenced.

Value

A first difference taken ts object with a user selected name.

Author(s)

Omer Kara

Examples

x <- data.frame(V1 = c(1:10), V2 = c(1:10), V3 = c(1:10))
x.ts <- ts(x)
data.diff <- Diff.Col(Data = x.ts, Diff.ColNames = c("V1", "V3"))
data.diff


omerkara/okara documentation built on Nov. 21, 2023, 7:56 p.m.