Learn R Programming

ArArRedux (version 1.0)

average: Calculate the arithmetic mean

Description

Calculate the arithmetic mean of some logratio data

Usage

average(x, i = NULL, newlabel = NULL)

Arguments

x

an object of class redux or logratios

i

(optional) vector of sample indices

newlabel

(optional) string with the new label to be assigned to the averaged values

Value

an object of the same class as x

Examples

Run this code
# NOT RUN {
data(Melbourne)
K <- average(Melbourne$X,grep("K:",Melbourne$X$labels),newlabel="K-glass")
plotcorr(K)
# }

Run the code above in your browser using DataLab