S3 methods for the arithmetric mean. See base::mean() for general use of mean().

# S3 method for qntmap
mean(x, index = "Whole area", cluster = NULL, density = NULL, ...)

# S3 method for qm_xmap
mean(x, index = "Whole area", cluster = NULL, density = NULL, ...)

# S3 method for qm_cluster
mean(x, index = "Whole area", cluster = NULL, density = NULL, ...)

Arguments

x

A qntmap class object returned by quantify() or qntmap().

index

A vector of length `1`` or length equal to number of pixels in map. An index can be created using mask image through segment().

cluster

A result of cluster_xmap() (i.e., qm_cluster class object). cluster is required when specifying density.

density

A named numeric vector specifying density of all the phases in x. (e.g., c(Qtz = 2.6, Ab = 2.6)).

...

Ignored

mean.qntmap

A returning value is a data.frame whose first column lists elements, and second to last columns lists mean values of each elements by index.

See also