Description Usage Arguments Value See Also Examples
Compute the median absolute deviation for a vector, dispatching only
on the first argument, x
.
NOTE: This man page is for the mad
S4 generic function
defined in the BiocGenerics package.
See ?stats::mad
for the default method
(defined in the stats package).
Bioconductor packages can define specific methods for objects
not supported by the default method.
1 2 |
x, center, constant, na.rm, low, high |
See |
See ?stats::mad
for the value returned by the
default method.
Specific methods defined in Bioconductor packages should behave as consistently as possible with the default method.
stats::mad
for the default
mad
method.
showMethods
for displaying a summary of the
methods defined for a given generic function.
selectMethod
for getting the definition of
a specific method.
BiocGenerics for a summary of all the generics defined in the BiocGenerics package.
1 2 3 | mad
showMethods("mad")
selectMethod("mad", "ANY") # the default method
|
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colMeans, colSums, colnames, do.call,
duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
setdiff, sort, table, tapply, union, unique, unsplit, which,
which.max, which.min
standardGeneric for "mad" defined from package "BiocGenerics"
function (x, center = median(x), constant = 1.4826, na.rm = FALSE,
low = FALSE, high = FALSE)
standardGeneric("mad")
<environment: 0x38db108>
Methods may be defined for arguments: x
Use showMethods("mad") for currently available ones.
Function: mad (package BiocGenerics)
x="ANY"
Method Definition (Class "derivedDefaultMethod"):
function (x, center = median(x), constant = 1.4826, na.rm = FALSE,
low = FALSE, high = FALSE)
{
if (na.rm)
x <- x[!is.na(x)]
n <- length(x)
constant * if ((low || high) && n%%2 == 0) {
if (low && high)
stop("'low' and 'high' cannot be both TRUE")
n2 <- n%/%2 + as.integer(high)
sort(abs(x - center), partial = n2)[n2]
}
else median(abs(x - center))
}
<bytecode: 0x38f7a28>
<environment: namespace:stats>
Signatures:
x
target "ANY"
defined "ANY"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.