Learn R Programming

mau (version 0.4.0)

stand_string: Standardize strings

Description

Function to correct and standardize names, designed to eliminate special characters, spaces and other characters.

Usage

stand_string(x, chr = NULL, rep = NULL)

Value

Returns data table with definition of utility functions by range

Arguments

x

text to be formatted

chr

character vector of replace characters

rep

character vector of replacement characters

Author

Julio Andrade, Pedro Guarderas, Andrés Lopez pedro.felipe.guarderas@gmail.com

Examples

Run this code
 x <- c( "H?\u00da\u00e0n with C@1_ad1", 
       "M\u00a1a/\u00ac\u00b0r&\u00eca *_the#-rot", 
       "ju%LI\u00d6 a P\u00e9rs", 
       "(S)tev\n\u00e9n\t los cat%$" )
 y <- sapply( x, FUN = stand_string )
 names( y ) <- NULL

Run the code above in your browser using DataLab