Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

timeSeries-isUnivariate

Checks if a Time Series is Univariate


Description

Checks if a time series o bject 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

isUnivariate
isMultivariate

return a logical depending if the test is true or not.

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

Financial Time Series Objects (Rmetrics)

v3062.100
GPL (>= 2)
Authors
Diethelm Wuertz [aut] (original code), Tobias Setz [cre], Yohan Chalabi [ctb], Martin Maechler [ctb] (<https://orcid.org/0000-0002-8685-9910>)
Initial release
2020-01-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.