S3 generic extending var to support Image
objects. Non-Image inputs delegate to stats::var.
Usage
var(x, ...)
# Default S3 method
var(x, y = NULL, na.rm = FALSE, use, ...)
# S3 method for class 'Image'
var(x, ...)Arguments
- x
An
Imageobject, or a numeric vector/matrix for the default method.- ...
Additional arguments passed to methods.
- y
NULLor a numeric vector/matrix; passed tostats::varfor non-Image objects.- na.rm
Logical; should missing values be removed? Passed to
stats::varfor non-Image objects (ignored forImage).- use
An optional character string specifying the method for computing covariances; passed to
stats::varfor non-Image objects.
Value
For Image inputs, a numeric vector of per-channel variances.
For other inputs, the result of var.