quotes.Rd
Wrap text in curly quotes
quotes(..., type = c("double", "single"), curly = TRUE)
... | Character. Text to go between curly quotes,
and any other arguments to be passed to |
---|---|
type | Character. Type of quotes: "single" or "double". |
curly | Logical. Set to FALSE for straight quotes. |
Character. String surrounded in quotation marks.
quotes
is a wrapper for glue
,
so you can use curly bracket notation and multiple character strings
just like with glue
.
#> “hello world”quotes("hello world", type = "single")#> ‘hello world’quotes("hello ", "world", type = "single")#> ‘hello world’fname <- glue("I{enye()}igo") lname <- "Montoya" quotes("hello, my name is {fname} {lname}", type = "single")#> Error in eval(parse(text = text, keep.source = FALSE), envir): object 'fname' not foundquotes( "Hello, my name is {fname} {lname}. ", "You killed my father. Prepare to die." )#> Error in eval(parse(text = text, keep.source = FALSE), envir): object 'fname' not foundquotes( "Hello, my name is {fname} {lname}. ", "I'm boring, and I use straight quotes.", curly = FALSE )#> Error in eval(parse(text = text, keep.source = FALSE), envir): object 'fname' not found