knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) devtools::load_all(".")
The objective of astimeseries
is to simplify and assure the correct coercion among data structures used in the tidyverse
to R-Mertrics (timeSeries
class).
You can install the development version from GitHub with:
install.packages("devtools") devtools::install_github("Reckziegel/astimeseries")
Suppose you have the following tibble
:
library(tibble) tbl <- tibble(date = as.Date(c('2019-01-01', '2019-01-02', '2019-01-03')), a = rnorm(3), b = rnorm(3), c = rnorm(3)) tbl
If you try to coerce the tbl
object to a timeSeries
(the data structure R-Metrics likes to work with), the timestamps attributes are lost:
library(timeSeries) as.timeSeries(tbl)
Instead, it's safer to use as_timeseries
to ensure all information is keeped approprietly.
# library(astimeseries) as_timeseries(tbl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.