|
DATA MINING
Desktop Survival Guide by Graham Williams |
|
|||
R provides the usual string type and string manipulation functions:
> chartr("a-m", "m-z", "abcdef") # "mnopqr"
> grep
> nchar
> sub
> substr
> tolower("ABCdef") # "abcdef"
> toupper("ABCdef") # "ABCDEF"
> pmatch("png", c("jpeg", "png", "gif")) # 2
|
R provides some useful predefined variables, including:
> letters # a b c d [...] z > LETTERS # A B C D [...] Z |