Learn R Programming

BEQI2 (version 2.0-0)

stripSpaces: Remove Redundant Spaces

Description

This function removes redundant spaces from character vectors

Usage

stripSpaces(x)

Arguments

x
character vector

Value

character vector without trailing or multiple spaces

Examples

Run this code
stopifnot(BEQI2:::stripSpaces(" Hello  World  ") == "Hello World")

Run the code above in your browser using DataLab