View source: R/prepare_insertion.R
prepare_insertion | R Documentation |
Collapses a list
/vector
of expectation strings and adds the specified indentation.
prepare_insertion(
strings,
indentation = 0,
trim_left = FALSE,
trim_right = FALSE
)
strings |
Expectation strings. (List or Character) As returned with |
indentation |
Indentation to add. (Numeric) |
trim_left |
Whether to trim whitespaces from the beginning of the collapsed string. (Logical) |
trim_right |
Whether to trim whitespaces from the end of the collapsed string. (Logical) |
A string for insertion with rstudioapi::insertText()
.
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
# Attach packages
library(xpectr)
## Not run:
df <- data.frame('a' = c(1, 2, 3), 'b' = c('t', 'y', 'u'),
stringsAsFactors = FALSE)
tests <- gxs_selection("df", out = "return")
for_insertion <- prepare_insertion(tests)
for_insertion
rstudioapi::insertText(for_insertion)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.