Generate code from a vector of values
Usage
create_vec(x, collapse = ", ", enclose = c("x = c(", ")"), style = TRUE, ...)
Arguments
- x
<vec>
vector- 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
- ...
Additional arguments passed to
styler::tidyverse_style()
Examples
hcpcs <- c(
"63091", "81536", "99305", "63012",
"78835", "E0185", "44408", "87485",
"36015", "0581F", "33478", "21184",
"42999", "15155", "76705", "23412",
"99406", "0585T", "0272T", "92507")
create_vec(x = hcpcs)
#> x <- c("63091", "81536", "99305", "63012", "78835", "E0185", "44408", "87485", "36015", "0581F", "33478", "21184", "42999", "15155", "76705", "23412", "99406", "0585T", "0272T", "92507")