On excel:

PROPER(JoHNson BorRis) = Johnson Boris

How do we achieve the same outcome on R? 

Function: stri_trans_totitle

Package: stringi

Example:

data$Rename <- stri_trans_totitle(data$Name)

*
There are various methods to solve this on r using: gsub, strsplit, substring etc. However these methods can be complicated if the basic objects are not well identified.

Advertisements