apply: Apply Wrappers

Description Usage Arguments Details

Description

These are thin but clearer wrappers to apply(x, 1, FUN, ...) (row apply) and apply(x, 2, FUN, ...) (column apply). Intended for use with 2D R matrixs. We do a bit more work to ensure row names, column names are passed along if appropriate.

Usage

1
2
3
rowApply(X, FUN, ..., drop = TRUE)

colApply(X, FUN, ..., drop = TRUE)

Arguments

X

A matrix, or a 2D array.

FUN

The function to be applied.

...

Optional arguments to FUN.

drop

Boolean. If TRUE, we 'drop' dimensions so that results of dimension n x 1 or 1 x n are coerced to vectors.

Details

See apply for more info.



Search within the Kmisc package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.