Learn R Programming

ArArRedux (version 1.1)

average: Calculate the arithmetic mean

Description

Calculate the arithmetic mean of some logratio data

Usage

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

Value

an object of the same class as x

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

Examples

Run this code
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