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
Just observed some strange behaviour when combining the dplyr::pick function with mean, which fails because of a is.numeric test in the base R function mean.
Taking the mean fails (returns only NA) with the warning:
df %>% summarise(mean(pick(c(x,y))))
# A tibble: 1 × 1
`mean(pick(c(x, y)))`
<dbl>
1 NA
Warning message:
There was 1 warning in `summarise()`.
ℹ In argument: `mean(pick(c(x, y)))`.
Caused by warning in `mean.default()`:
! argument is not numeric or logical: returning NA
Thanks for a great package. Christian
The text was updated successfully, but these errors were encountered:
I'll close this issue as I realised this doesn't have to do with pick, but my misunderstanding of how mean works: eg df %>% summarise(mean(c(x,y))) works where df %>% summarise(mean(x,y)) doesn't.
Just observed some strange behaviour when combining the
dplyr::pick
function with mean, which fails because of ais.numeric
test in the base R function mean.Taking the sum is not an issue:
Taking the mean fails (returns only NA) with the warning:
Thanks for a great package. Christian
The text was updated successfully, but these errors were encountered: