[R] mean() produces NA on double column [FIXED]

Rich Shepard r@hep@rd @end|ng |rom @pp|-eco@y@@com
Thu Nov 4 19:54:26 CET 2021


On Thu, 4 Nov 2021, Rui Barradas wrote:

> Maybe
> which(is.na(pdx_stage$ft))
> Have you tried na.rm = TRUE?
> mean(pdx_stage$ft, na.rm = TRUE)

Rui,

I just scrolled through the data file.

Yes, there are severeal NAs when the equipment was down and I hadn't put
na.rm = TRUE in the read_csv() import command.

I hadn't caught them before.

Thanks,

Rich



More information about the R-help mailing list