On Sun, 29 Aug 2021, Rui Barradas wrote:

I forgot in my previous answer, sorry for the duplicated mails.
The function in my previous mail has a na.rm argument, defaulting to FALSE, pass na.rm = TRUE to remove the NA's.

agg <- aggregate(cfs ~ date, df1, fun, na.rm = TRUE)

Or simply change the default. I prefer to set na.rm = FALSE because that's what R's functions do. And I will only be used to one default, with base R functions or my own code.

Hope this helps,

Rui,

Again, yes it does.

Regards,

Rich

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to