Skip to content

summary stats including NA's into new dataframe

2 messages · Alexander.Herr@csiro.au, Uwe Ligges

#
Alexander.Herr at csiro.au wrote:
You didn't read carefully enough:

aggregate(......., function(x) sum(is.na(x)))
                    ^^^^^^^^^^^^

Or instead of this anonymous function, you can do as well:

countna <- function(x) sum(is.na(x))
aggregate(......., countna)