str_rm_whitespace_df {forstringr}R Documentation

Remove extra spaces in a data frame

Description

str_rm_whitespace_df() removes all leading, trailing, and collapses multiple consecutive white spaces in non-numerical variables in a data frame.

Usage

str_rm_whitespace_df(df)

Arguments

df

A data frame or data frame extension (e.g. a tibble) with leading or trailing spaces.

Value

A clean data frame with no leading or trailing spaces.

Examples

richest_in_nigeria

str_rm_whitespace_df(richest_in_nigeria)


[Package forstringr version 1.0.0 Index]