All Questions
Tagged with tidyverse time-series
87
questions
0
votes
0
answers
32
views
Time series returns a warning message, "subscript out of bounds", but not in all cases
Working on a time series of monthly labor data in the USA. If the forecast is set to 1 month, then this returns a warning message, but 3 months does not return a warning message.
Get the data, set the ...
0
votes
0
answers
27
views
How to add trace to an R autoplot generated by in Tidyverse?
I am pretty new to R programming and there is a question that I couldn't find the answer for. I try to visualize a time series with simple exponential prediction. As you can see in the code below, I ...
0
votes
1
answer
84
views
viewing intraday periodicity / timeframe (minute not daily bars) of stock price data using tidyquant in R
I would like to look at stock price data in R at a period smaller than daily. 1minute, 5minute, or 30minute would be ideal. I have tried working with the tq_transmute command but I cannot seem to get ...
0
votes
0
answers
401
views
How to install anomalize package in R version 4.2.2
I'm trying to install the "anomalize" package in R version 4.2.2. I'm using a university device, and it takes a while for IT to respond, so I can't update my RStudio. I need to run some time ...
0
votes
0
answers
27
views
slider function to calculate a single value before certain days on a time series
I have a data frame (test_copy) as follows. I am trying to calculate the amount of A 24 hr before each particular date using the slide function below.
Aat24hrbfor = slide(test_copy$A, ~.x, .before = ...
0
votes
1
answer
54
views
Performing modeling on multiple tsibbles in a tibble
I have a set of data that is in the form of the following:
library(tidyverse)
library(readxl)
library(tsibble)
library(tsibbledata)
library(purrr)
library(lubridate)
library(fable)
library(fabletools)
...
2
votes
1
answer
276
views
R: How to add vertical line (geom_vline) on plotly (ts_plot)?
I have weekly time series for 2 variables. Now I need to add 2 vertical lines (geom_vline) at "2019-11-10" and "2020-04-26 date points.
structure(list(week = structure(c(18119, 18126, ...
0
votes
1
answer
124
views
How to fill in missing times in R from next and previous date time?
I want to use a way where I can successfully match values for 'checks' which have no start and end times. At first I thought to use bilinear interpolation for this task, but then i thought that's too ...
0
votes
1
answer
19
views
Dataframe in R: add new columns, data is from current dataframe
Suppose I have the following df,
df <- data.frame(
month = 12:1,
value = c(2,3,4,2,3,4,2,3,4,2,3,4)
)
which contains value for each of the past 12 months.
Now I want to add two new ...
0
votes
1
answer
37
views
How to make an monthly dataset using the last day of each month in R dplyr?
I need to create an new df by using only the last day in each month using R dplyr or maybe tidyverse ...
library(tidyverse)
library(dplyr)
library(lubridate)
library(BatchGetSymbols)
portfolio <- ...
1
vote
1
answer
61
views
Using padr::thicken() with an uneven timestamp interval
I have a dataset that looks like this:
structure(list(Fish_ID = c("Fork1", "Fork10", "Fork15", "Fork20",
"Fork21", "Fork22", "...
1
vote
1
answer
130
views
Multivariate time series - is there notation to select all the variables, or do they all have to be written out?
I'm working to build a multivariate time series to make predictions about labor in the United States. The fpp3 package is excellent, but I don't see a notation to model all the variables.
For example, ...
0
votes
1
answer
102
views
Cross-validation in time series is returning errors, but non cross-validation method runs without errors and higher accuracy
I'm working to forecast the number of employees in the United States by month. The data is located at:
library(tidyverse)
library(fpp3)
# Source: https://beta.bls.gov/dataViewer/view/timeseries/...
1
vote
2
answers
1k
views
R: aggregate rows to transform monthly into quarterly data
I have a dataframe with monthly observations. Each row represents a month.
I need to transform it into a dataframe with quarterly observations. In other words, I need to aggregate months 1-3 to form ...
2
votes
2
answers
101
views
How do I find the interval with the most values in a time series data frame with a lot of NAs?
I have a time series data frame consisting of 980 observations and 980 variables. There are a lot of NAs in the data set. I need to find the perfect interval with the most data (variables) in a given ...