Learn R Programming

cities (version 0.1.3)

rep_col: rep_rcol

Description

Helper function to repeat a matrix by column

Usage

rep_col(x, n)

Value

matrix with vector x repeated n-times by columns.

Arguments

x

vector to repeat

n

number of repetions

Examples

Run this code
set.seed(1)
rep_col(rnorm(5), 5)

Run the code above in your browser using DataLab