You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to perform the following nest and unnest actions.
library(tidyr)
library(tsibble)
data<-tsibbledata::hh_budgetdata_nested<-data %>% nest(data=-Country)
data_nested %>% unnest(data)
#> Error in if (unknown_interval(interval) && (nrows > vec_size(key_data))) { : #> missing value where TRUE/FALSE needed#> In addition: Warning messages:#> 1: In min(..., na.rm = TRUE) :#> no non-missing arguments to min; returning Inf#> 2: In max(..., na.rm = TRUE) :#> no non-missing arguments to max; returning -Inf
I found out that the error comes from here:
vctrs::vec_unchop(data_nested$data)
#> Error in if (unknown_interval(interval) && (nrows > vec_size(key_data))) { : #> missing value where TRUE/FALSE needed#> In addition: Warning messages:#> 1: In min(..., na.rm = TRUE) :#> no non-missing arguments to min; returning Inf#> 2: In max(..., na.rm = TRUE) :#> no non-missing arguments to max; returning -Inf
I actually get the expected result if I do the following, however I can't define indices from unnest.
Since {tidyr} v1.0.0, unnest() no longer works for tsibble and also makes it impossible to adapt for tsibble.
The data_nested is a tbl_df, and unnest.tbl_df() doesn't know how to properly handle a list of tsibbles. I can't provide unnest.tbl_df() in {tsibble} to overwrite it.
library(tidyr)
library(tsibble)
library(tsibbledata)
data <- hh_budget
data_nested <- data %>% nest(data = -Country)
class(data_nested)
#> [1] "tbl_df" "tbl" "data.frame"
I'm trying to perform the following
nest
andunnest
actions.I found out that the error comes from here:
I actually get the expected result if I do the following, however I can't define
indices
fromunnest
.I don't have the same error if
Year
(the index) is one of the nesting variables:However the outputs are
tibble
s instead oftsibble
s.Here
sessionInfo()
:The text was updated successfully, but these errors were encountered: