Learn R Programming

qdap (version 2.4.6)

spaste: Add Leading/Trailing Spaces

Description

Adds trailing and/or leading spaces to a vector of terms.

Usage

spaste(terms, trailing = TRUE, leading = TRUE)

Value

Returns a character vector with trailing and/or leading spaces.

Arguments

terms

A character vector of terms to insert trailing and/or leading spaces.

trailing

logical. If TRUE inserts a trailing space in the terms.

leading

logical. If TRUE inserts a leading space in the terms.

Examples

Run this code
if (FALSE) {
spaste(Top25Words)
spaste(Top25Words, FALSE)
spaste(Top25Words, trailing = TRUE, leading = FALSE) #or
spaste(Top25Words, , FALSE)
}

Run the code above in your browser using DataLab