replicate: Replicate Each Elements of Vectors

replicateR Documentation

Replicate Each Elements of Vectors

Description

Replicate Each Elements of Vectors

Usage

rep_n(x, each)

rep_character(x, each)

Arguments

x

vectors

each

one or more numbers for replication

Value

replicated vectors

Examples

rep_n(c('ab','cde','k','op'),5)
rep_n(c('ab','cde','k','op'),c(4,6))
rep_n(c('ab','cde','k','op'),c(1,2,3,4))

rep_character(c('ab','cde','k','op'),5)
rep_character(c('ab','cde','k','op'),c(4,6))
rep_character(c('ab','cde','k','op'),c(1,2,3,4))

do documentation built on Sept. 12, 2024, 6:27 a.m.