[R] diagnostic information ....

Jason Turner jasont at indigoindustrial.co.nz
Thu Dec 18 22:25:32 CET 2003


Whoops.  That should be a "&&" where I put a "||".

naPrint <- function(model,...) {
     if(!inherits(model,"lm") && !inherits(model,"glm"))
         stop("no support for class ",class(model),"\n")
     if(!is.null(model$na.action)) {
         action <- paste("na.action:",attr(model$na.action,"class"))
         rows <- as.numeric(model$na.action)
         list(action=action,rows=rows)
     } else { #no missing values
         list(action=options()$na.action, rows=NULL)
     }
}


-- 
Indigo Industrial Controls Ltd.
http://www.indigoindustrial.co.nz
64-21-343-545
jasont at indigoindustrial.co.nz




More information about the R-help mailing list