apply_by_block: Modify matrix by blocks

View source: R/apply_by_blocks.R

apply_by_blockR Documentation

Modify matrix by blocks

Description

Applies a function to a matrix by horizontal or vertical blocks.

Usage

apply_by_block(Y, layout, L, FUN, ...)

Arguments

Y

Matrix

layout

Blocks are distributed: 1 horizontally, 2 vertically.

L

Number of lines of the block.

FUN

Funtion to apply to the block.

...

Arguments to be passed to FUN.

Value

A matrix.


cuadramelo documentation built on Oct. 10, 2024, 5:07 p.m.