Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google


Strings

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



Subsections

Copyright © 2004-2006 [email protected]
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.