Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tk_get_timeseries_variables

Get date or datetime variables (column names)


Description

Get date or datetime variables (column names)

Usage

tk_get_timeseries_variables(data)

Arguments

data

An object of class data.frame

Details

tk_get_timeseries_variables returns the column names of date or datetime variables in a data frame. Classes that meet criteria for return include those that inherit POSIXt, Date, zoo::yearmon, zoo::yearqtr. Function was adapted from padr:::get_date_variables(). See padr helpers.R

Value

tk_get_timeseries_variables returns a vector containing column names of date-like classes.

Examples

library(tidyquant)
library(timetk)

FANG %>%
    tk_get_timeseries_variables()

timetk

A Tool Kit for Working with Time Series in R

v2.6.1
GPL (>= 3)
Authors
Matt Dancho [aut, cre], Davis Vaughan [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.