inplace-sweep {inplace}R Documentation

Sweep

Description

Sweep

Usage

sweep1_in_place(x, STATS, FUN = c("-", "+", "*", "/"))

sweep2_in_place(x, STATS, FUN = c("-", "+", "*", "/"))

Arguments

x

a matrix.

STATS

the summary statistic which is to be swept out.

FUN

the function to be used to carry out the sweep.

Value

NULL, invisibly.

Examples

x <- matrix(1:6, 2)
sweep(x, 2, 1:3)
x
sweep2_in_place(x, 1:3)
x


[Package inplace version 0.1.2 Index]