are2TsTimeCompatible {KarsTS}R Documentation

are2TsTimeCompatible: test time compatibility between two time series

Description

It checks for three types of compatibility: the initial dates are the same, the sampling period is the same and the final date is the same. It is used internally to check whether the inputs chosen by the user are appropiated.

Usage

are2TsTimeCompatible (TS1, TS2)

Arguments

TS1

A time series

TS2

Another time series

Value

A logical vector, which is c(TRUE, TRUE, TRUE) when all the time compatibilty conditions are met.

Author(s)

Marina Saez Andreu

Examples


## Generate two time series
TS1 <- genTSExample(InKTSEnv = FALSE)
TS2 <- genTSExample(InKTSEnv = FALSE)

## Their times are identical
timeComp <- are2TsTimeCompatible (TS1, TS2)
timeComp

## We modifify the time of TS2. Now their starts are different,
## although they still have same sampling period and length
TS2$time <- TS2$time + 1
timeComp <- are2TsTimeCompatible (TS1,  TS2)
timeComp


[Package KarsTS version 2.4.1 Index]