Learn R Programming

PTXQC (version 1.1.2)

repEach: Repeat each element x_i in X, n_i times.

Description

Repeat each element x_i in X, n_i times.

Usage

repEach(x, n)

Value

Vector with values from x, n times

Arguments

x

Values to be repeated

n

Number of repeat for each x_i (same length as x)

Examples

Run this code

  repEach(1:3, 1:3)  ## 1, 2, 2, 3, 3, 3

Run the code above in your browser using DataLab