From searching online and in this group, it seems like this should work:
> mean(r_lab$ozone, na.rm=TRUE)
However, what I get is:
[1] NA
Warning message:
In mean.default(r_lab$ozone, na.rm = TRUE) :
argument is not numeric or logical: returning NA
This is the contents of that column in the dataset:
> r_lab$Ozone
[1] 41 36 12 18 NA 28 23 19 8 NA 7 16 11 14
[15] 18 14 34 6 30 11 1 11 4 32 NA NA NA 23
I'm sort of flustered.