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
library(purrr)
x1<-list(
list(1),
list(list(2))
)
# it works as expected
modify_depth(x1, .depth=-1, ~.+1, .ragged=TRUE) %>% str()
#> List of 2#> $ :List of 1#> ..$ : num 2#> $ :List of 1#> ..$ :List of 1#> .. ..$ : num 3# .ragged should also be TRUE by default here because .depth is negative
modify_depth(x1, .depth=-1, ~.+1)
#> Error: List not deep enough
We have an error because value of .ragged is FALSE, because .depth is modified
internally before .ragged is evaluated.
* force .ragged evaluation in modify_depth
Otherwise .depth is modified and .ragged is not evaluated to the correct value. closes#530
* add NEWS bullet
We have an error because value of
.ragged
is FALSE, because.depth
is modifiedinternally before
.ragged
is evaluated.purrr/R/modify.R
Lines 203 to 212 in 977f1fd
The text was updated successfully, but these errors were encountered: