Table of Contents

R - Apply a function over a data structure

About

The apply function call a function over a data structure:

Examples

Mean

R - Mean

apply(USArrests,2,mean)

Variance

R - Variance

apply(USArrests,2,var)