as_timeseries: Coerce any data structure to timeSeries class

Description Usage Arguments Value Examples

View source: R/as_timeseries.R

Description

Coerce any data structure to timeSeries class

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
as_timeseries(.data, .select = NULL, .date_var = NULL,
  .silent = TRUE, ...)

as_timeseries_(.data, .select = NULL, .date_var = NULL,
  .silent = TRUE, ...)

## Default S3 method:
as_timeseries_(.data, .select = NULL,
  .date_var = NULL, .silent = TRUE, ...)

## S3 method for class 'data.frame'
as_timeseries_(.data, .select = NULL,
  .date_var = NULL, .silent = TRUE, ...)

## S3 method for class 'matrix'
as_timeseries_(.data, .select = NULL,
  .date_var = NULL, .silent = TRUE, ...)

## S3 method for class 'xts'
as_timeseries_(.data, .select = NULL, .date_var = NULL,
  .silent = TRUE, ...)

## S3 method for class 'ts'
as_timeseries_(.data, .select = NULL, .date_var = NULL,
  .silent = TRUE, ...)

## S3 method for class 'zooreg'
as_timeseries_(.data, .select = NULL,
  .date_var = NULL, .silent = TRUE, ...)

## S3 method for class 'zoo'
as_timeseries_(.data, .select = NULL, .date_var = NULL,
  .silent = TRUE, ...)

Arguments

.data

The data to be coerced

.select

Select the columns to be included in the timeSeries object. Valid only for data.frames and tibbles. If NULL (the default) all the numeric columns will be used.

.date_var

Inform the date column. Valid for data.frames and tibbles only. If NULL the function will do it's best to find the date column.

.silent

Should warnings messages be omitted? The default is TRUE.

...

Addicional parameters to be passed into a timeSeries class.

Value

A timeSeries object.

Examples

1
2
3
4
5

Reckziegel/astimeseries documentation built on Nov. 13, 2019, 12:32 a.m.