Skip to content
Prev 189721 / 398498 Next

Counting the number of non-NA values per day

Try 

tempFun <- function(x) sum(!is.na(x))
nonZeros <-  aggregate(pollution["pol"],format(pollution["date"],"%Y-%j"), FUN = tempFun)
--- On Wed, 12/8/09, Tim Chatterton <tim.chatterton at uwe.ac.uk> wrote: