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

db_ts_store.list with empty list #239

Open
HomoCodens opened this issue Feb 3, 2021 · 1 comment
Open

db_ts_store.list with empty list #239

HomoCodens opened this issue Feb 3, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@HomoCodens
Copy link
Collaborator

HomoCodens commented Feb 3, 2021

calling db_ts_store.list (i.e. storing a plain list of ts) with an empty list causes an error.

Reason is that the following bit results in a list() instead of a vector of booleans and the following x <- x[is_tsl] fails.

x <- list()
is_tsl <- sapply(x, function(y) inherits(y, c("ts","zoo","xts")))
is_tsl
#> list()

I guess it would be most elegant to somehow pass empty lists by that check as there is already a "length 0 not supported" clause in db_ts_store.tslist which we need not repeat.

@HomoCodens HomoCodens added the bug label Feb 3, 2021
@HomoCodens HomoCodens self-assigned this Feb 3, 2021
@HomoCodens
Copy link
Collaborator Author

Actually that "is it a ts check" is redundant, we pass the list off to db_ts_store.tslist which already does it.

HomoCodens added a commit that referenced this issue May 6, 2021
db_ts_store.tslist already does that

closes #239
@HomoCodens HomoCodens added this to the CRAN milestone Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant