are2TsTimeCompatible: are2TsTimeCompatible: test time compatibility between two...

Description Usage Arguments Value Author(s) Examples

View source: R/are2TsTimeCompatible.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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

KarsTS documentation built on Jan. 16, 2021, 5:07 p.m.