timeSeries-isUnivariate: Checks if a time series is univariate

isUnivariateR Documentation

Checks if a time series is univariate

Description

Checks if a time series object or any other rectangular object is univariate or multivariate.

Usage

isUnivariate(x)
isMultivariate(x)

Arguments

x

an object of class "timeSeries" or any other rectangular object.

Details

A rectangular object x is considered to be univariate if the function NCOL(x) returns one, and is considered to be multivariate if NCOL(x) returns a value bigger than one.

Value

a logical value

Examples

## Load Microsoft Data - 
   setRmetricsOptions(myFinCenter = "GMT")
   data(MSFT)
   Open = MSFT[, "Open"]
  
## Is the 'timeSeries' Univariate - 
   isUnivariate(MSFT)
   isUnivariate(Open)

## Is the 'timeSeries' Multivariate -   
   isMultivariate(MSFT)
   isMultivariate(Open)

timeSeries documentation built on Sept. 30, 2024, 9:15 a.m.