fm.applyR Documentation

Apply Functions Over Array Margins

Description

Apply a predefined function on rows/columns of a FlashR matrix. The predefined function always output a vector of the same length. Thus, the output of fm.apply is a matrix.

Usage

fm.apply(x, margin, FUN)

Arguments

x

a FlashR matrix.

margin

an integer. 1 indicates rows and 2 indicates columns.

FUN

a string that indicates the name of the predefined function.

Details

Currently, the predefined functions include "rank" and

Value

a FlashR matrix.

Examples

mat <- fm.runif.matrix(100, 10)
res <- fm.apply(mat, 1, "rank")