trim.trailing: Function: trim.trailing(variable_name)

Description Usage Arguments Details

Description

Definition: Sometimes when files from SPSS are imported as dataframes to R, or when one works with windows text files in linux some trailing whitespaces creeps in. This function returns the same variable_name but without the extra whitespaces. It only works for final whitespaces.

Usage

1

Arguments

x

= variable

Details

Example: df$variable <- trim.trailing (otherdf$variable)

Source: http://stackoverflow.com/a/2261149/4417072


lf-araujo/sempsychiatry documentation built on May 21, 2019, 5:12 a.m.