Questions tagged [tsibble]

R package for tidy time series (tsibble: Tidy Temporal Data Frames and Tools)

tsibble: Tidy Temporal Data Frames and Tools

Provides a 'tbl_ts' class (the 'tsibble') for temporal data in an data- and model-oriented format.

The 'tsibble' provides tools to easily manipulate and analyse temporal data, such as filling in time gaps, aggregating over calendar periods, and etc.

119 questions
0
votes
1 answer

How to divide a tsibble column by a number in R?

I posted a similar question a while ago and got an anwser that worked for an xts: standardize<-function(ts) { as.xts(apply(ts, 2, function(x) x / x[1])) } Now I have a tsibble that fails with a: Error in x/x[1] : non-numeric argument to binary…
Ray Tayek
  • 9,841
  • 8
  • 50
  • 90
0
votes
1 answer

'lambda' not found in model fitting

I m using tsibble package tourism . trying to do transformation and fit models to it. library(tsibble) library(feasts) library(dplyr) sum_tourism <- tourism %>% group_by(Region) %>% summarise(sum_trips=sum(Trips)) fit <- function(ts, col){ …
Bob
  • 13
  • 3
0
votes
0 answers

Custom Quarter ranges based on dates

I have been trying to create custom quarter date ranges like this: 2001-01-01 to 2001-01-03 = Q4 2001-04-01 to 2001-06-03 = Q1 2001-07-01 to 2001-09-03 = Q2 2001-10-01 to 2001-12-03 = Q3 using this function below: Data <- data.frame( test_date =…
On_demand
  • 47
  • 6
0
votes
1 answer

Preparing non-equal length or sample freq time series for dtwclust

Looking for assistance on how to prepare multiple time series of varying length (and sampling frequency) for clustering with the dtwclust package in R. Note that my series are at 15 or 30 minute sampling frequencies and the date/time isn't relevant…
Meep
  • 521
  • 3
  • 14
0
votes
1 answer

Fill gaps in a grouped tsibble with group-specific starts and ends

I've got a tsibble where timestamped observational data has been aggregated to 30-minute intervals. The data is in several groups, and I'd like to make sure that each 30-minute group appears in the tsibble, even when there were no observations in…
BestGirl
  • 319
  • 1
  • 13
0
votes
1 answer

Non-unique timestamps in grouped tsibble

I've got timestamped data recording how many observations of a certain type were made at a certain time. For the sake of illustration, suppose I'm a birdwatcher observing flocks of duck and geese, recording -- each time I observe a flock -- the time…
BestGirl
  • 319
  • 1
  • 13
0
votes
0 answers

imputeTS maxgap unexpected behaviuor with Tsibble

I have to fill missing data in a tsibble with imputeTS. I want to limit the number of consecutive NAs to be filled with maxgap. Any maxgap value different from Inf gives an error. library(tsibble) library(imputeTS) harvest <- tsibble( year =…
mviolati
  • 3
  • 3
0
votes
1 answer

How to control the fill_gaps interval in tsibble?

I have two data frames that fill missing in different intervals. I would like to fill the two to the same interval. Consider two data frames with the same month-day but two years apart: library(tidyverse) library(fpp3) df_2020 <- tibble(month_day =…
Isaiah
  • 2,091
  • 3
  • 19
  • 28
0
votes
1 answer

R autoregression AR1 model not the same output as the ARIMA function

I'm trying to understand something about autoregressive time series forecasting models. This is probably going to seem like a basic question to anyone who knows what they are doing. I'm trying to dig into the theory in order to learn how it works,…
hachiko
  • 671
  • 7
  • 20
0
votes
1 answer

Selecting a unique index for tsibble in R when no unique column exists

I have a dataset for aircraft flight crashes. It looks like this date,time,location,operator,flight,route,type,registration,cn_in,aboard,fatalities,ground,summary 1908-09-17,17:18,"Fort Myer, Virginia",Military - U.S. Army,,Demonstration,Wright…
Tendekai Muchenje
  • 440
  • 1
  • 6
  • 20
0
votes
0 answers

Why does running the yearmonth function in the tsibble R package keep giving me Rcpp error?

When I run the below code, using the tsibble package, I get the error message: Error: Problem with `mutate()` column `Month`. i `Month = yearmonth(Month)`. x function 'Rcpp_precious_remove' not provided by package 'Rcpp' I tried reinstalling Rcpp,…
Village.Idyot
  • 1,359
  • 2
  • 8
0
votes
0 answers

Why does yearmonth return something different if I type in a date?

I want to create a yearmonth of "2016 Jan" and am using tsibble. For some reason when I create the yearmonth object I get back the month prior. Here's an example: > yearmonth("2016 Jan") [1] "2015 Dec" > yearmonth("2016…
Chrispresso
  • 3,660
  • 2
  • 19
  • 31
0
votes
0 answers

how to convert a tibble to tsibble (RStudio)

Convert bicycle.rda to a tsibble with an index of dteday. how to convert bicycle.rda to a tsibble with an index of dteday? Thank you!
0
votes
1 answer

How to convert monthly data as.date type variable in R?

I have monthly data and want to convert period columns as.date in r. In addition, rows are not ordered according to time in data frame df <- data.frame (period = c("March 2019", "February 2019", "January 2019", "May 2019","April 2019","August…
Aaron
  • 13
  • 3
0
votes
0 answers

Is there a way to make aggregate vectors made from fable forecast easier to read? Or rename them?

I'm forecasting hierarchical data with fable that has 2 levels of aggregation (but will have more in the future), and am having trouble knowing which predictions correspond to which series. Here is a simplified version of what I have: # A fable: 7 x…