Learn R Programming

cities (version 0.1.3)

rep_row: rep_row

Description

Helper function to repeat a matrix by row

Usage

rep_row(x, n)

Value

Matrix with vector x repeated n-times by rows.

Arguments

x

vector to repeat

n

number of repetions

Examples

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

Run the code above in your browser using DataLab