[R-gregmisc-users] SF.net SVN: r-gregmisc:[1563] trunk/gdata/R/nobs.R
Brought to you by:
warnes
From: <wa...@us...> - 2012-06-13 01:00:14
|
Revision: 1563 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1563&view=rev Author: warnes Date: 2012-06-13 01:00:07 +0000 (Wed, 13 Jun 2012) Log Message: ----------- nobs.default needs to handle logical as well as numeric vectors. Modified Paths: -------------- trunk/gdata/R/nobs.R Modified: trunk/gdata/R/nobs.R =================================================================== --- trunk/gdata/R/nobs.R 2012-06-08 22:04:34 UTC (rev 1562) +++ trunk/gdata/R/nobs.R 2012-06-13 01:00:07 UTC (rev 1563) @@ -8,7 +8,7 @@ nobs.default <- function(object, ...) { - if(is.numeric(object)) + if(is.numeric(object) || is.logical(object)) sum( !is.na(object) ) else stats:::nobs.default(object, ...) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |