Wraps vector elements with string provided in wrap argument.

wrap(x, wrap = "\"")

Arguments

x

a vector to wrap

wrap

a string to wrap around vector elements

Value

a string with wrapped elements

References

This function was moved from rapport package: https://rapporter.github.io/rapport/.

Author

Aleksandar Blagotic

Examples

if (FALSE) { # \dontrun{
wrap('foobar')
wrap(c('fee', 'fi', 'foo', 'fam'), '_')
} # }