cleanSpaces {NMdata}R Documentation

Drop leading, trailing and repeated spaces in character strings

Description

Drop leading, trailing and repeated spaces in character strings

Usage

cleanSpaces(x, double = TRUE, lead = TRUE, trail = TRUE)

Arguments

x

A vector of character strings to modify

double

Replace any number of consecutive blank spaces by a single blank. Default is TRUE.

lead

Drop spaces before first non-empty character. Default is TRUE.

trail

Drop spaces after last non-empty character. Default is TRUE.


[Package NMdata version 0.1.7 Index]