Skip to content

Daily to Weekly and Daily to Monthly Aggregation #51

@taranpreetk

Description

@taranpreetk

Salutation for the day.

Thank you for the fantastic package design.

I was unsure if this package could aggregate time series from daily to weekly and daily to monthly because when I attempt to do so, I receive an error saying there isn't an option for "weekly" or "monthly".

I have put a reproducible example for this.

`
library(Sim.DiffProc)
library(stats)
library(tempdisagg)
set.seed(1234)

dates <- seq(as.Date("2019-01-01"), as.Date("2023-12-31"), by = "1 day")

X <- GBM(N = length(dates)-1, M = 1, x0 = 50, y= 200)
daily_data <- data.frame(dates,X)
daily_data <- ts(daily_data$X1, start = c(2019,1,1), end = c(2022,12,31), frequency = 365)
weekly_data <- ta(daily_data, conversion = "sum", to = "weekly")
monthly_data <- ta(daily_data, conversion = "sum", to = "monthly")
`
Error in Console:
daily_to_weekly_and_monthly_error

I'm not sure how to get this working as it is needed for the use case I'm working on. Any help on this will be appreciated.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions