R - Apply a function over a data structure

Card Puncher Data Processing

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)





Discover More
Card Puncher Data Processing
R - List

The list in R may contain elements of the different class (just like a data frame) class a vector (1 dimension) or a matrix (2 dimensions) data.tables and data.frames are internally lists with all...



Share this page:
Follow us:
Task Runner