stateGenerator: State Generator

Description Usage Arguments Value Examples

View source: R/stateGenerator.R

Description

Add a column to the dataset with a unique indentifier for the operating conditions

Usage

1
2
3
stateGenerator(data, stateVars, minObs = round((2 *
  length(which(!(colnames(data) %in% stateVars))))^2/2),
  testingDay = NULL, rollingWindowDays = 0)

Arguments

data

Dataframe with column names

stateVars

Vector of character strings to identify state variables by their column names in data

minObs

Number of minimum observations required to define a "state." Defaults to statistically required p^2/2 where p is the number of process variables (including lag)

testingDay

Date object of the day to be evaluated for faults.

rollingWindowDays

Integer with the number of days of data to be included in the training window.

Value

A list of xts objects with data, a merged "labelCol," and separated by operating state

Examples

1
dataBR <- stateGenerator(data = dataBR, stateVars = stateVarsBR, minObs = rollingWindowObs)

KNewhart/ADPCA documentation built on Oct. 8, 2019, 11:29 p.m.