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
{{ message }}
Repository navigation
.ragged default in modify_depth is not correcly evaluated #530
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.
Activity
force .ragged evaluation in modify_depth
Evaluates .ragged in modify_depth before modifying .depth (#531)