df_to_xts: Function converts a data.frame to an xts time object

View source: R/df_to_xts.R

df_to_xtsR Documentation

Function converts a data.frame to an xts time object

Description

The data.frame must have a time based Date or POSIXct column along with one or more data columns. Function returns an xts time object.

Usage

df_to_xts(df, time_col, data_cols)

Arguments

df

A data.frame containing time and data columns

time_col

A string that is the name for the time column from df.

data_cols

A string or vector string containing the name(s) of data columns from df.

Value

An xts time series object

Author(s)

Rick Dean


deandevl/RtsaPkg documentation built on Oct. 5, 2023, 5:23 p.m.