[R-gregmisc-users] SF.net SVN: r-gregmisc:[1534] trunk/gdata
Brought to you by:
warnes
From: <wa...@us...> - 2012-05-31 22:14:50
|
Revision: 1534 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1534&view=rev Author: warnes Date: 2012-05-31 22:14:44 +0000 (Thu, 31 May 2012) Log Message: ----------- - Remove dispatch function 'nobs' and method 'nobs.lm' since these are now provided by the R 'stats' package. Modified Paths: -------------- trunk/gdata/R/nobs.R trunk/gdata/man/nobs.Rd Modified: trunk/gdata/R/nobs.R =================================================================== --- trunk/gdata/R/nobs.R 2012-05-31 22:03:07 UTC (rev 1533) +++ trunk/gdata/R/nobs.R 2012-05-31 22:14:44 UTC (rev 1534) @@ -1,12 +1,14 @@ # $Id$ -nobs <- function(x,...) - UseMethod("nobs",x) +## Now provided by 'stats' package +## nobs <- function(x,...) +## UseMethod("nobs",x) -nobs.default <- function(x, ...) sum( !is.na(x) ) +nobs.default <- function(object, ...) sum( !is.na(object) ) -nobs.data.frame <- function(x, ...) - sapply(x, nobs.default) +nobs.data.frame <- function(object, ...) + sapply(object, nobs.default) -nobs.lm <- function(x, ...) - nobs.default(x$residuals) +## Now provided by the 'stats' package +## nobs.lm <- function(x, ...) +## nobs.default(x$residuals) Modified: trunk/gdata/man/nobs.Rd =================================================================== --- trunk/gdata/man/nobs.Rd 2012-05-31 22:03:07 UTC (rev 1533) +++ trunk/gdata/man/nobs.Rd 2012-05-31 22:14:44 UTC (rev 1534) @@ -28,30 +28,30 @@ % \name{nobs} -\alias{nobs} -\alias{nobs.default} +%% \alias{nobs} % Now provided by stats \alias{nobs.data.frame} -\alias{nobs.lm} +\alias{nobs.default} +%% \alias{nobs.lm} % Now provided by stats %- Also NEED an `\alias' for EACH other topic documented here. \title{ Compute the Number of Non-missing Observations } \description{ - Compute the number of non-missing observations. Special methods exist for - data frames, and lm objects. + Compute the number of non-missing observations. New 'default' method, + and method for data frames. } \usage{ -nobs(x, ...) -\method{nobs}{default}(x, ...) -\method{nobs}{data.frame}(x, ...) -\method{nobs}{lm}(x, ...) +%% nobs(object, ...) +\method{nobs}{default}(object, ...) +\method{nobs}{data.frame}(object, ...) +%% \method{nobs}{lm}(object, ...) } \arguments{ - \item{x}{ Target Object } + \item{object}{ Target Object } \item{\dots}{ Optional parameters (currently ignored)} } \details{ In the simplest case, this is really just wrapper code for - \code{sum(!is.na(x))}. + \code{sum(!is.na(object))}. } \value{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |