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 just starting to look at this but I wonder if it's https://github.com/sfirke/janitor/blob/main/R/tabyl.R#L122 ? I can explore that further and refactor if so. I don't understand why this didn't pop up in my testing & revdep testing though.
@sfirke the warning doesn't show up for me with CRAN janitor, but it does show up for janitor 2.1.0, so I think that is why you didn't see it.
In 2.1.0 the line you pointed to is
result %>% dplyr::filter(!is.na(.[1]))
rather than
result %>% dplyr::filter(!is.na(.[,1]))
and that , makes the difference when result is a bare data frame (which it is for janitor here) because the drop = TRUE default turns it into a vector (so you don't get a warning).
Do you know the name of that column though? I'd encourage you to use result %>% dplyr::filter(!is.na(dat)) if that is always the name of the column, or result %>% dplyr::filter(!is.na(.[[1]])) which is slightly safer and would work if result was a tibble too (which has drop = FALSE as a default for type stability)
Hello,
I report this here (as instructed, see warning in the reprex below), but I think it is an issue of the excellent janitor package rather than dplyr.
In any case, it would be a pity if in the future this broke my workflow, so can anyone look into it?
Many thanks!
Created on 2023-02-02 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: