spaces: Creates a string of blank spaces

View source: R/string_functions.R

spacesR Documentation

Creates a string of blank spaces

Description

A function to create a string of some number of blank spaces. This function is useful when trying to align things.

Usage

spaces(num)

Arguments

num

The desired number of spaces.

Value

A single character vector of blank spaces.

Examples

# Create spaces
spaces(10)
# [1] "          "

# Use spaces to separate something
str <- "Left" %p% spaces(40) %p% "Right"
str
# [1] "Left                                        Right"

common documentation built on Sept. 29, 2022, 9:06 a.m.