mean.folder: Means of a folder of data sets

View source: R/mean.folder.R

mean.folderR Documentation

Means of a folder of data sets

Description

Computes the means by column of the elements of an object of class folder.

Usage

## S3 method for class 'folder'
mean(x, ..., na.rm = FALSE)

Arguments

x

an object of class folder that is a list of data frames with the same column names.

...

further arguments passed to or from other methods.

na.rm

logical. Should missing values (including NaN) be omitted from the calculations? (see mean or colMeans)

Details

It uses colMeans to compute the mean by numeric column of each element of the folder. If some columns of the data frames are not numeric, there is a warning, and the means are computed on the numeric columns only.

Value

A list whose elements are the mean by column of the elements of the folder.

Author(s)

Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard

See Also

folder to create an object of class folder. var.folder, cor.folder, skewness.folder, kurtosis.folder for other statistics for folder objects.

Examples

# First example: iris (Fisher)               
data(iris)
iris.fold <- as.folder(iris, "Species")
iris.means <- mean(iris.fold)
print(iris.means)

# Second example: roses
data(roses)
roses.fold <- as.folder(roses, "rose")
roses.means <- mean(roses.fold)
print(roses.means)

dad documentation built on Aug. 30, 2023, 5:06 p.m.