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-2010 Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
The PDF version is a formatted comprehensive draft book (with over 800 pages).
Brought to you by Togaware. This page generated: Sunday, 22 August 2010