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

2021-11-04 Thread Rich Shepard
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

Re: [R] mean() produces NA on double column

2021-11-04 Thread Rui Barradas
Hello, Maybe which(is.na(pdx_stage$ft)) Have you tried na.rm = TRUE? mean(pdx_stage$ft, na.rm = TRUE) Hope this helps, Rui Barradas Às 18:34 de 04/11/21, Rich Shepard escreveu: I'm not seeing what's different about this tibble so that mean() returns NA on a column of doubles:

[R] mean() produces NA on double column

2021-11-04 Thread Rich Shepard
I'm not seeing what's different about this tibble so that mean() returns NA on a column of doubles: head(pdx_stage) # A tibble: 6 × 8 site_nbr year mon dayhr min tz ft 1 14211720 200710 1 1 0 PDT3.21 2 14211720 200710 1 130