11
STRING MANIPULATION
Although R is a statistical language with
numeric vectors and matrices playing a
central role, character strings are surpris-
ingly important as well. Ranging from birth
dates stored in medical research data files to text-
mining applications, character data arises quite fre-
quently in R programs. Accordingly, R has a number
of string-manipulation utilities, many of which will be
introduced in this chapter.
11.1 An Overview of String-Manipulation Functions.................................
Here, we’ll briefly review just some of the many string-manipulation func-
tions R has to offer. Note that the call forms shown in this introduction
are very simple, usually omitting many optional arguments. We’ll use some
of those arguments in our extended examples later in the chapter, but do
check R’s online help for further details.