stripe_matrix: Create a stripped matrix with non-uniform block sizes.

View source: R/stripe_matrix.R

stripe_matrixR Documentation

Create a stripped matrix with non-uniform block sizes.

Description

Create a stripped matrix with non-uniform block sizes.

Usage

stripe_matrix(x = NULL, s = NULL, byrow = FALSE, dimnames = NULL)

Arguments

x

Vector of numbers to identify each stripe.

s

Vector of values for the size of the stripes, order depending on byrow

byrow

Logical value. If FALSE (the default) the stripes are filled by columns, otherwise the stripes in the matrix are filled by rows.

dimnames

Character string of name attribute for the basis of the stripped matrix. If NULL a vector of the same length of s provides the basis of row and column names.

Value

Returns a matrix with stripe sizes determined by the s argument. Each stripe is filled with the same value taken from x.

Author(s)

Guy J. Abel

See Also

block_matrix, ipf2_stripe

Examples

stripe_matrix(x = 1:44, s = c(2,3,4,2), dimnames = LETTERS[1:4], byrow = TRUE)

migest documentation built on Nov. 18, 2023, 9:06 a.m.