nobs: Compute the Number of Non-missing Observations
Description
Compute the number of non-missing observations. Special methods exist for
data frames, and lm objects.
Usage
nobs(x, ...)
## S3 method for class 'default':
nobs(x, ...)
## S3 method for class 'data.frame':
nobs(x, ...)
## S3 method for class 'lm':
nobs(x, ...)
Arguments
x
Target Object
...
Optional parameters (currently ignored)
Value
A single numeric value or a vector of values (for data.frames) giving
the number of non-missing values.
Details
In the simplest case, this is really just wrapper code for
sum(!is.na(x)).