dts1: Dataframe for ggplottimeseries

Description Usage Arguments Value Author(s) Examples

View source: R/dts1.R

Description

This function creates a data frame of decomposed time series.

Usage

1
dts1(x, y, z, type = "additive")

Arguments

x

a vector of the dates formatted as YYYY-MM-DD

y

a vector of the observed time-series values

z

frequency (the number of observations per unit of time)

type

type of time series, either "additive" (default) or multiplicative

Value

This returns to a dataframe with the components of timeseries

date

date formatted as YYYY-MM-DD

observation

observation of the timeseries

trend

trend component of the timeseries

seasonal

seasonal component of the timeseries

random

random component of the timeseries

Author(s)

Brisneve Edullantes

Examples

1
2
3
4
5
6
7
8
data(sst)

x <- sst$date
y <- sst$sst
z <- 365.25 #number of days in a year
df <- dts1(x,y,z, type = "additive")

head(df)

brisneve/ggplottimeseries documentation built on May 7, 2019, 3:08 p.m.