set_whitespace: Set whitespace in character

Description Usage Arguments Examples

View source: R/set_whitespace.R

Description

When printing whitespace, some applications will ignore or remove the whitespace, for example it will simplify " " to " ". In this instance, it will be useful to replace the double whitespace with a space preceding by "symbol" (or the other way round conditionally).

Usage

1
set_whitespace(x, symbol = " ")

Arguments

x

vector of character strings to set the whitespace for

symbol

character string to be used as the whitespace. In general, for HTML output (default), use " " and for LaTeX, use "\\\\quad" (the double escape is required)

Examples

1
2
x <- c("  a", "b  ", "  c  ")
set_whitespace(x)

MyKo101/mutils documentation built on July 28, 2020, 8:52 p.m.