rep_cols: Repeat columns

View source: R/utils.R

rep_colsR Documentation

Repeat columns

Description

Repeats each column of the matrix or data frame 'x' a number of times equal to 'times'.

Usage

rep_cols(x, times)

Arguments

x

A matrix or data frame

times

An integer indicating the number of times to repeat the row/column

Value

A matrix or data.frame depending on the type of the input

Examples

test_matrix <- matrix(runif(12), 4)
rep_cols(test_matrix, 2)


spdesign documentation built on Oct. 18, 2024, 5:07 p.m.