We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Some questions on how to access output from seas_multi objects:
seas_multi
library(seasonal) m <- seas(cbind(fdeaths, mdeaths))
most work fine:
head(final(m)) #> fdeaths mdeaths #> [1,] 605.9811 1566.633 #> [2,] 538.6371 1514.975 #> [3,] 589.4354 1468.244 #> [4,] 606.7556 1678.065 #> [5,] 599.5486 1661.425 #> [6,] 547.2017 1557.990
but some don’t - the last one because the call element was addedt to the output in 1.9:
call
head(residuals(m)) #> NULL head(original(m)) #> fdeaths mdeaths call.fdeaths call.mdeaths #> [1,] 901 2134 901 2134 #> [2,] 689 1863 689 1863 #> [3,] 827 1877 827 1877 #> [4,] 677 1877 677 1877 #> [5,] 522 1492 522 1492 #> [6,] 406 1249 406 1249
@bcmonsell suggests in #278 that this should work:
z <- lapply(m, udg) #> Error in FUN(X[[i]], ...): inherits(x, "seas") is not TRUE
This acually works:
z <- lapply(Filter(function(x) inherits(x, "seas"), m), udg) head(z$fdeaths) #> $date #> [1] "Apr 18, 2022" #> #> $time #> [1] "22.55.59" #> #> $version #> [1] 1.1 #> #> $build #> [1] 57 #> #> $output #> [1] "html" #> #> $srstit #> [1] "ser1"
Or shorter, in R >= 4.1:
z <- lapply(Filter(\(x) inherits(x, "seas"), m), udg)
But perhaps we want all functions to work on both single and multiple objects? E.g., this:
# udg(m)
Perhaps as a data frame?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Some questions on how to access output from
seas_multi
objects:most work fine:
but some don’t - the last one because the
call
element was addedt to theoutput in 1.9:
@bcmonsell suggests in #278 that this should work:
This acually works:
Or shorter, in R >= 4.1:
But perhaps we want all functions to work on both single and multiple objects? E.g., this:
# udg(m)
Perhaps as a data frame?
The text was updated successfully, but these errors were encountered: