Describe the enhancement requested
See the following example. In base R na.rm will also remove NaN values, because of the fact that is.na(NaN) == TRUE.
suppressPackageStartupMessages(library(dplyr))
data.frame(x= c(1, 2, NaN)) |>arrow::as_arrow_table() |>
summarise(x_avg= mean(x, na.rm=TRUE)) |> collect()
#> # A tibble: 1 × 1#> x_avg#> <dbl>#> 1 NaN
data.frame(x= c(1, 2, NaN)) |> summarise(x_avg= mean(x, na.rm=TRUE))
#> x_avg#> 1 1.5
Created on 2024-09-12 with reprex v2.1.0
Component(s)
R
Describe the enhancement requested
See the following example. In base R
na.rmwill also removeNaNvalues, because of the fact thatis.na(NaN) == TRUE.Created on 2024-09-12 with reprex v2.1.0
Component(s)
R