Is it possible to set na.rm to TRUE globally?
问题 For commands like max the option na.rm is set by default to FALSE . I understand why this is a good idea in general, but I'd like to turn it off reversibly for a while -- i.e. during a session. How can I require R to set na.rm = TRUE whenever it is an option? I found options(na.action = na.omit) but this doesn't work. I know that I can set a na.rm=TRUE option for each and every function I write. my.max <- function(x) {max(x, na.rm=TRUE)} But that's not what I am looking for. I'm wondering if