replicate: Replicate Each Elements of Vectors

Description Usage Arguments Value Examples

Description

Replicate Each Elements of Vectors

Usage

1
2
3
rep_n(x, each)

rep_character(x, each)

Arguments

x

vectors

each

one or more numbers for replication

Value

replicated vectors

Examples

1
2
3
4
5
6
7
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 July 16, 2021, 9:08 a.m.