Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default handling of date/time basis dataset for amStockMultiSet #91

Open
remijul opened this issue Sep 25, 2019 · 0 comments
Open

Default handling of date/time basis dataset for amStockMultiSet #91

remijul opened this issue Sep 25, 2019 · 0 comments

Comments

@remijul
Copy link

remijul commented Sep 25, 2019

Thank you so much for implementing a such excellent library in R !
I noticed a default behavior of amStockMultiSet fonction : when dataset is based on daily basis, the time scale is preserved, however for hourly basis dataset the time scale is aggregated to a daily unit. Then the hourly basis is not preserved.

Do you have a trick to handle a such behavior ?

See just below a minimal example.

library(rAmCharts)

Minimal example 1 : hourly basis data frame

hour <- seq(from=as.POSIXct("2019-9-25 0:00", tz="GMT"),
to=as.POSIXct("2019-9-26 0:00", tz="GMT"),
by="hour")

df1 <- data.frame(date = hour,
value1 = sample(1:100, size = length(hour), replace = TRUE))

df2 <- data.frame(date = hour,
value1 = sample(1:200, size = length(hour), replace = TRUE))

data1 <- list("1" = df1, "2" = df2)

amStockMultiSet(data = data1)

Minimal example 2 : daily basis data frame

date <- seq(from=as.POSIXct("2019-9-1 0:00", tz="GMT"),
to=as.POSIXct("2019-9-30 0:00", tz="GMT"),
by="day")

df3 <- data.frame(date = date,
value1 = sample(1:100, size = length(date), replace = TRUE))

df4 <- data.frame(date = date,
value1 = sample(1:200, size = length(date), replace = TRUE))

data2 <- list("3" = df3, "4" = df4)

amStockMultiSet(data = data2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant