Generate a sequence of numbers with a new prefix
Arguments
- n
<int>
Numeric sequence to generate- new
<chr>
New prefix- between
<chr>
Separator betweennew
andold
, default" = "
- old
<chr>
Old prefix- collapse
<chr>
Separator between sequences, default", "
- enclose
<chr>
(optional) Vector oflength(x) == 2
with which to enclose output- style
<lgl>
Applystyler::style_text()
to output, defaultTRUE
Examples
rename_seq(
n = 10,
new = "id_issuer_",
between = " = ",
old = "Other.ID.Issuer.",
enclose = c("x = c(", ")"),
collapse = ",\n ",
style = TRUE)
#> x <- c(
#> id_issuer_1 = Other.ID.Issuer.1,
#> id_issuer_2 = Other.ID.Issuer.2,
#> id_issuer_3 = Other.ID.Issuer.3,
#> id_issuer_4 = Other.ID.Issuer.4,
#> id_issuer_5 = Other.ID.Issuer.5,
#> id_issuer_6 = Other.ID.Issuer.6,
#> id_issuer_7 = Other.ID.Issuer.7,
#> id_issuer_8 = Other.ID.Issuer.8,
#> id_issuer_9 = Other.ID.Issuer.9,
#> id_issuer_10 = Other.ID.Issuer.10
#> )