Closed Bisaloo closed 3 weeks ago
as.data.table()
does make a copy by default
I merged new features into main and then thought it would be a good idea to fix the ensuing merge conflicts here. Maybe I should not have done that, apologies for interfering with your code.
This created a test failure due to the fact that the functions for nominal forecasts I implemented modified forecasts objects in a way that triggered your checks.
I made a PR targeting this PR to fix these issues: https://github.com/epiforecasts/scoringutils/pull/892
This is great, thanks so much!
f <- as_forecast_quantile(example_quantile)
f <- f |>
dplyr::select(-observed)
f
Just noting that we wouldn't get any warnings when people use dplyr
. But I assume that is expected/intended, right?
It feels like replacing the as.data.table()
calls eventually would be nice, but we can also make this an issue and address it later.
oo sorry Nikos I read this first as a approval and not a comment and so hit merge....
I agree as should look at the data.table
issue separately.
No worries, I think it's fine to merge. @Bisaloo thanks a lot, this was a really cool PR!
Do you think there is something clever we can do with dplyr
as well? I remember looking into what they use under the hood for mutate
at some point. But maybe we also don't want to get too far down the rabbit hole...
This is a first draft for #816
Todo:
head()
andtail()
methods to avoid unnecessary warningsOpen questions / discussion points:
unclass
argument inclean_forecast()
?