as_str | R Documentation |
Similar to paste0(..., collapse = "")
, but recursively converts its inputs to type character.
as_str(..., sep = "", rm_na = FALSE)
... |
R objects to be assembled to a single string. Dynamic dots are supported. |
sep |
Separator to delimit |
rm_na |
Exclude missing values. If |
A character scalar.
Other string functions:
as_chr()
,
as_comment_str()
,
as_line_feed_chr()
,
capitalize_first()
,
dsv_colnames()
,
enum_str()
,
escape_lf()
,
fuse_regex()
,
prettify_nr()
,
sentenceify()
,
wrap_chr()
library(magrittr)
input <-
paste0(2:4,
collapse = ", ") |>
purrr::map(rep,
times = 20) %>%
list(c("This is a glut of ", "meaningless numbers: "), .)
# while this just converts `input` in a lazy way...
paste0(input,
collapse = "")
# ...this one works harder
pal::as_str(input)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.