Immediate download R Programming for Data Science Roger D. Peng ebooks 2024
Immediate download R Programming for Data Science Roger D. Peng ebooks 2024
com
https://ebookmeta.com/product/r-programming-for-data-
science-roger-d-peng/
OR CLICK BUTTON
DOWNLOAD NOW
https://ebookmeta.com/product/the-art-of-data-science-roger-d-peng/
ebookmeta.com
https://ebookmeta.com/product/r-programming-for-actuarial-science-1st-
edition-mcquire/
ebookmeta.com
https://ebookmeta.com/product/introduction-to-banking-3rd-edition-
claudia-girardone/
ebookmeta.com
https://ebookmeta.com/product/cross-my-heart-steamy-in-
sweetville-10-1st-edition-haven-rose/
ebookmeta.com
https://ebookmeta.com/product/the-bitcoin-dilemma-weighing-the-
economic-and-environmental-costs-and-benefits-1st-edition-colin-l-
read/
ebookmeta.com
https://ebookmeta.com/product/pennsylvania-dutch-the-story-of-an-
american-language-1st-edition-mark-l-louden/
ebookmeta.com
Religious Giving For Love of God 1st Edition David H Smith
https://ebookmeta.com/product/religious-giving-for-love-of-god-1st-
edition-david-h-smith/
ebookmeta.com
R Programming for Data Science
Roger D. Peng
© 2014 - 2016 Roger D. Peng
Also By Roger D. Peng
The Art of Data Science
Exploratory Data Analysis with R
Report Writing for Data Science in R
Contents
1. Stay in Touch! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2. Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
5.15 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
13.8 rename() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
13.9 mutate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
13.10 group_by() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
13.11 %>% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
13.12 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
15. Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
15.1 Functions in R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
15.2 Your First Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
15.3 Argument Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
15.4 Lazy Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
15.5 The ... Argument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
15.6 Arguments Coming After the ... Argument . . . . . . . . . . . . . . . . . . . . . 78
15.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
23. Data Analysis Case Study: Changes in Fine Particle Air Pollution in the U.S. . . . . . 141
23.1 Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
23.2 Loading and Processing the Raw Data . . . . . . . . . . . . . . . . . . . . . . . . . 141
23.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
1
2. Preface
I started using R in 1998 when I was a college undergraduate working on my senior thesis.
The version was 0.63. I was an applied mathematics major with a statistics concentration and
I was working with Dr. Nicolas Hengartner on an analysis of word frequencies in classic texts
(Shakespeare, Milton, etc.). The idea was to see if we could identify the authorship of each of the
texts based on how frequently they used certain words. We downloaded the data from Project
Gutenberg and used some basic linear discriminant analysis for the modeling. The work was
eventually published¹ and was my first ever peer-reviewed publication. I guess you could argue
it was my first real “data science” experience.
Back then, no one was using R. Most of my classes were taught with Minitab, SPSS, Stata, or
Microsoft Excel. The cool people on the cutting edge of statistical methodology used S-PLUS. I
was working on my thesis late one night and I had a problem. I didn’t have a copy of any of those
software packages because they were expensive and I was a student. I didn’t feel like trekking over
to the computer lab to use the software because it was late at night.
But I had the Internet! After a couple of Yahoo! searches I found a web page for something called R,
which I figured was just a play on the name of the S-PLUS package. From what I could tell, R was a
“clone” of S-PLUS that was free. I had already written some S-PLUS code for my thesis so I figured
I would try to download R and see if I could just run the S-PLUS code.
It didn’t work. At least not at first. It turns out that R is not exactly a clone of S-PLUS and quite a few
modifications needed to be made before the code would run in R. In particular, R was missing a lot of
statistical functionality that had existed in S-PLUS for a long time already. Luckily, R’s programming
language was pretty much there and I was able to more or less re-implement the features that were
missing in R.
After college, I enrolled in a PhD program in statistics at the University of California, Los Angeles.
At the time the department was brand new and they didn’t have a lot of policies or rules (or classes,
for that matter!). So you could kind of do what you wanted, which was good for some students and
not so good for others. The Chair of the department, Jan de Leeuw, was a big fan of XLisp-Stat and
so all of the department’s classes were taught using XLisp-Stat. I diligently bought my copy of Luke
Tierney’s book² and learned to really love XLisp-Stat. It had a number of features that R didn’t have
at all, most notably dynamic graphics.
But ultimately, there were only so many parentheses that I could type, and still all of the research-
level statistics was being done in S-PLUS. The department didn’t really have a lot of copies of S-PLUS
lying around so I turned back to R. When I looked around at my fellow students, I realized that I
was basically the only one who had any experience using R. Since there was a budding interest in R
¹http://amstat.tandfonline.com/doi/abs/10.1198/000313002100#.VQGiSELpagE
²http://www.amazon.com/LISP-STAT-Object-Oriented-Environment-Statistical-Probability/dp/0471509167/
2
Preface 3
around the department, I decided to start a “brown bag” series where every week for about an hour
I would talk about something you could do in R (which wasn’t much, really). People seemed to like
it, if only because there wasn’t really anyone to turn to if you wanted to learn about R.
By the time I left grad school in 2003, the department had essentially switched over from XLisp-
Stat to R for all its work (although there were a few hold outs). Jan discusses the rationale for the
transition in a paper³ in the Journal of Statistical Software.
In the next step of my career, I went to the Department of Biostatistics⁴ at the Johns Hopkins
Bloomberg School of Public Health, where I have been for the past 12 years. When I got to Johns
Hopkins people already seemed into R. Most people had abandoned S-PLUS a while ago and were
committed to using R for their research. Of all the available statistical packages, R had the most
powerful and expressive programming language, which was perfect for someone developing new
statistical methods.
However, we didn’t really have a class that taught students how to use R. This was a problem because
most of our grad students were coming into the program having never heard of R. Most likely in
their undergradute programs, they used some other software package. So along with Rafael Irizarry,
Brian Caffo, Ingo Ruczinski, and Karl Broman, I started a new class to teach our graduate students
R and a number of other skills they’d need in grad school.
The class was basically a weekly seminar where one of us talked about a computing topic of interest.
I gave some of the R lectures in that class and when I asked people who had heard of R before, almost
no one raised their hand. And no one had actually used it before. The main selling point at the time
was “It’s just like S-PLUS but it’s free!” A lot of people had experience with SAS or Stata or SPSS. A
number of people had used something like Java or C/C++ before and so I often used that a reference
frame. No one had ever used a functional-style of programming language like Scheme or Lisp.
To this day, I still teach the class, known a Biostatistics 140.776 (“Statistical Computing”). However,
the nature of the class has changed quite a bit over the past 10 years. The population of students
(mostly first-year graduate students) has shifted to the point where many of them have been
introduced to R as undergraduates. This trend mirrors the overall trend with statistics where we
are seeing more and more students do undergraduate majors in statistics (as opposed to, say,
mathematics). Eventually, by 2008–2009, when I’d asked how many people had heard of or used
R before, everyone raised their hand. However, even at that late date, I still felt the need to convince
people that R was a “real” language that could be used for real tasks.
R has grown a lot in recent years, and is being used in so many places now, that I think it’s
essentially impossible for a person to keep track of everything that is going on. That’s fine, but
it makes “introducing” people to R an interesting experience. Nowadays in class, students are often
teaching me something new about R that I’ve never seen or heard of before (they are quite good
at Googling around for themselves). I feel no need to “bring people over” to R. In fact it’s quite the
opposite–people might start asking questions if I weren’t teaching R.
³http://www.jstatsoft.org/v13/i07
⁴http://www.biostat.jhsph.edu
Preface 4
This book comes from my experience teaching R in a variety of settings and through different stages
of its (and my) development. Much of the material has been taken from by Statistical Computing
class as well as the R Programming⁵ class I teach through Coursera.
I’m looking forward to teaching R to people as long as people will let me, and I’m interested in
seeing how the next generation of students will approach it (and how my approach to them will
change). Overall, it’s been just an amazing experience to see the widespread adoption of R over the
past decade. I’m sure the next decade will be just as amazing.
⁵https://www.coursera.org/course/rprog
3. History and Overview of R
There are only two kinds of languages: the ones people complain about and the ones
nobody uses —Bjarne Stroustrup
3.1 What is R?
This is an easy question to answer. R is a dialect of S.
3.2 What is S?
S is a language that was developed by John Chambers and others at the old Bell Telephone
Laboratories, originally part of AT&T Corp. S was initiated in 1976² as an internal statistical analysis
environment—originally implemented as Fortran libraries. Early versions of the language did not
even contain functions for statistical modeling.
In 1988 the system was rewritten in C and began to resemble the system that we have today (this
was Version 3 of the language). The book Statistical Models in S by Chambers and Hastie (the white
book) documents the statistical analysis functionality. Version 4 of the S language was released in
1998 and is the version we use today. The book Programming with Data by John Chambers (the
green book) documents this version of the language.
Since the early 90’s the life of the S language has gone down a rather winding path. In 1993 Bell Labs
gave StatSci (later Insightful Corp.) an exclusive license to develop and sell the S language. In 2004
Insightful purchased the S language from Lucent for $2 million. In 2006, Alcatel purchased Lucent
Technologies and is now called Alcatel-Lucent.
Insightful sold its implementation of the S language under the product name S-PLUS and built a
number of fancy features (GUIs, mostly) on top of it—hence the “PLUS”. In 2008 Insightful was
acquired by TIBCO for $25 million. As of this writing TIBCO is the current owner of the S language
and is its exclusive developer.
The fundamentals of the S language itself has not changed dramatically since the publication of the
Green Book by John Chambers in 1998. In 1998, S won the Association for Computing Machinery’s
Software System Award, a highly prestigious award in the computer science field.
¹https://youtu.be/STihTnVSZnI
²http://cm.bell-labs.com/stat/doc/94.11.ps
5
History and Overview of R 6
The key part here was the transition from user to developer. They wanted to build a language that
could easily service both “people”. More technically, they needed to build language that would
be suitable for interactive data analysis (more command-line based) as well as for writing longer
programs (more traditional programming language-like).
3.4 Back to R
The R language came to use quite a bit after S had been developed. One key limitation of the S
language was that it was only available in a commericial package, S-PLUS. In 1991, R was created
by Ross Ihaka and Robert Gentleman in the Department of Statistics at the University of Auckland. In
1993 the first announcement of R was made to the public. Ross’s and Robert’s experience developing
R is documented in a 1996 paper in the Journal of Computational and Graphical Statistics:
Ross Ihaka and Robert Gentleman. R: A language for data analysis and graphics. Journal
of Computational and Graphical Statistics, 5(3):299–314, 1996
In 1995, Martin Mächler made an important contribution by convincing Ross and Robert to use the
GNU General Public License⁴ to make R free software. This was critical because it allowed for the
source code for the entire R system to be accessible to anyone who wanted to tinker with it (more
on free software later).
In 1996, a public mailing list was created (the R-help and R-devel lists) and in 1997 the R Core
Group was formed, containing some people associated with S and S-PLUS. Currently, the core group
controls the source code for R and is solely able to check in changes to the main R source tree. Finally,
in 2000 R version 1.0.0 was released to the public.
³http://www.stat.bell-labs.com/S/history.html
⁴http://www.gnu.org/licenses/gpl-2.0.html
History and Overview of R 7
2.0⁶.
According to the Free Software Foundation, with free software, you are granted the following four
freedoms⁷
• The freedom to run the program, for any purpose (freedom 0).
• The freedom to study how the program works, and adapt it to your needs (freedom 1). Access
to the source code is a precondition for this.
• The freedom to redistribute copies so you can help your neighbor (freedom 2).
• The freedom to improve the program, and release your improvements to the public, so that
the whole community benefits (freedom 3). Access to the source code is a precondition for
this.
You can visit the Free Software Foundation’s web site⁸ to learn a lot more about free software. The
Free Software Foundation was founded by Richard Stallman in 1985 and Stallman’s personal web
site⁹ is an interesting read if you happen to have some spare time.
1. The “base” R system that you download from CRAN: Linux¹¹ Windows¹² Mac¹³ Source Code¹⁴
2. Everything else.
• The “base” R system contains, among other things, the base package which is required to run
R and contains the most fundamental functions.
• The other packages contained in the “base” system include utils, stats, datasets, graphics,
grDevices, grid, methods, tools, parallel, compiler, splines, tcltk, stats4.
⁶http://www.gnu.org/licenses/gpl-2.0.html
⁷http://www.gnu.org/philosophy/free-sw.html
⁸http://www.fsf.org
⁹https://stallman.org
¹⁰http://cran.r-project.org
¹¹http://cran.r-project.org/bin/linux/
¹²http://cran.r-project.org/bin/windows/
¹³http://cran.r-project.org/bin/macosx/
¹⁴http://cran.r-project.org/src/base/R-3/R-3.1.3.tar.gz
Other documents randomly have
different content
CHAPTER XVI
HENRY JEANES, ALIAS JAMES MULLEN
It had been raining heavily when the train drew up at the Cotley
platform, but as I did not know how far I might have to walk I had
put up my umbrella when leaving the station only to put it down
again as I entered the hairdresser’s shop. I was holding the half-
closed umbrella in my hand when my eye caught sight of the two
letters. To sweep them as if by accident into the folds of the
umbrella was the work of a second, and then as I turned quickly
round I saw a man without a hat and wearing a white apron slip out
of the door of a publichouse opposite and run hastily across the road
towards the shop, wiping his mouth with his hand as he did so.
As I expected, he was the proprietor of the establishment, and
after wishing me good-morning and apologising for being out of the
way by explaining that he had been across the road to borrow a
postage stamp, he proceeded to tuck me up in a white sheet
preparatory to cutting my hair.
The demand for postage stamps had evidently been heavy that
afternoon, and the task of affixing them had no doubt resulted in an
uncomfortable dryness of the mouth, which necessitated the
frequent use of liquid. Under the circumstances I considered this
rather fortunate than otherwise, for the man was not unaware of his
condition, and did his best to palliate it by being so obligingly
communicative in regard to any question I asked him that I could,
had I wished it, have acquainted myself with all that he knew about
every customer who patronised his establishment.
“You have letters addressed here sometimes, don’t you?” I asked,
as he was brushing my hair.
“Yes, sir, we ’ave letters addressed ’ere,” he made answer; “but
strictly confidential, of course,” whispering this in my ear with
drunken gravity, and adding, after a pause, with a meaning leer,
“Hand very convenient too, under certain circumstances. Is there
hany little thing you can do for us in that way yourself, sir? If so we
should be ’appy to accept your commission.”
The only little thing I was minded to do for him was to kick him,
and that right heavily, but repressing the unregenerate desire of the
natural man, I affected to be thinking the matter over, and then
replied—
“Why, yes, I think you might. My name is Smithers—Alfred John
Smithers, so if any letters addressed to that name come here you’ll
know they are for me, won’t you?”
“Certainly,” he said. “Only too ’appy to oblige a customer at hany
time. Living ’ere, sir?”
“Staying for a week or so,” I answered, “and I may perhaps come
to live, but am not sure yet. By-the-bye, do you ever get any letters
for my friend Mr. Henry Jeanes?”
“Mr. Henry Jeanes? Oh, yes, sir. And you are the second
gentleman that’s harsked me the same question. Mr. Green ’e
harsked me as well.”
“Mr. James Bakewell Green?” I said. “Oh, yes; he is a friend of
mine too.”
“Hindeed, sir!” (This with a deprecatory cough, as if he did not
think much of the late Mr. Green, and was inclined in consequence to
reconsider the favourable opinion he had apparently formed of
myself.) “Curious gentleman, Mr. Green. Never bought nothing in the
shop, Mr. Green didn’t. Most gentlemen as ’as their letters addressed
’ere takes a bottle of our ’air wash now and then for the good of the
’ouse; but Mr. Green ’e never ’ad as much as a stick of shaving soap
at hany time. ’E was halways harsking questions too, as I told Mr.
Jeanes.”
“Oh,” I said, beginning to see daylight in regard to the means by
which Mullen had got to know that Green was making inquiries
about him. “How did you come to mention the matter to Mr.
Jeanes?”
“Mr. Jeanes ’e left particular word, sir, that if hanybody harsked
after ’im we was to be sure and let ’im know.”
“I see,” I said. “And when do you expect Mr. Jeanes to call again?”
“Mr. Jeanes never calls, sir. We ’aven’t ever seen ’im. ’E sent us
hinstructions that all letters wot come for ’im was to be put in a
henvelope and addressed to ’im at Professor Lawrance’s ’air-cutting
establishment at Stanby, and we was to let ’im know if any one
harsked after ’im.”
At that moment the bell over the tobacconist’s shop outside
announced the entrance of a customer, and two young men pushing
open the swing door of the hairdressing saloon, seated themselves
to await their turn.
Under the circumstances, and especially as I had learnt all I
required, I did not think it wise to ask further questions, but I had a
particular reason—which the reader shall shortly hear—for wishing to
possess a specimen of the handwriting in which the letters for Henry
Jeanes, Esq., that were sent on to the care of Professor Lawrance’s
establishment at Stanby, were directed.
“Can you spare me a second in the outside shop?” I said to the
hairdresser.
“With pleasure, sir,” he answered, following me out. “What can I
do for you?”
“Look here,” I said, pushing half-a-sovereign towards him over the
counter, “that’s for your trouble in letting me have my letters
addressed here. And now another matter. I’ve not been very well to-
day, and want to see a doctor. Who’s the best man to go to?”
“Dr. Carruthers, Devonshire ’Ouse, Grayland Road, sir. Best doctor
in the town, sir,” he responded.
“Would you mind writing it down for me? I’ve got a beastly
memory.”
“With pleasure, sir,” he said, producing a bottle of ink, a pen, and
a sheet of paper from a drawer. “That’s it, sir. Much obliged, sir. I’ll
be very careful about the letters, and good-day, sir.”
CHAPTER XVII
ON THE HEELS OF JAMES MULLEN
“I’m pained to hear you don’t like my eye, Mr. James—Mr. ‘Truthful
James,’” I said sarcastically as I put the letter down, glancing
sideways all the same at a mirror on the wall to see if I could detect
any sinister expression in my eye which could account for the
unfavourable opinion Mr. James had formed of that feature. “And so
you didn’t tell me anything, didn’t you, you precious rascal? Some
day I may have an opportunity of telling you something, and then it
is possible you may find something else to dislike about me as well
as my eye. In the meantime I’ll take the liberty of detaining your
letter, as it would put Mullen on the alert if I let it go on to him. His
sister’s letter he must have, for if I fail to set hands on him here, I
can take him when he keeps his appointment with her on the steam
yacht, on board which he hopes to get out of the country. So I
mustn’t lose a moment in resealing her letter and getting it back by
hook or by crook to the letter-rack whence I got it. I’m not easy
about the forgery with which I replaced it. If there had chanced to
be only two or three letters waiting to be called for this morning,
and I had abstracted one without replacing it with a dummy, the
Professor would be bound to have noticed that a letter was missing.
But I’m running a risk in leaving the forged dummy there a moment
longer than I can help. Mullen might call and have it given him, or it
may get sent on; and though I flatter myself that the forgery is so
well done that even Mullen is not likely to notice any difference in
the handwriting, and though it is possible also that he will think the
cutting about Green’s death had been sent him by the Cotley barber,
I’d much rather that the dummy didn’t fall into his hands.
“To have forged a letter from the Cotley barber would have been
extremely dangerous, for I didn’t then know how the rascal
addressed Mullen. And to have enclosed a blank sheet of paper
would at once suggest the trick which had been played. The
newspaper cutting was the only thing I could think of that had the
look of being a bona fide enclosure from the rascal at Cotley. He had
to my knowledge informed Mullen that Green was inquiring about
him, and what was more natural than that, seeing a notice of
Green’s death in the papers, he should send it on to his principal.
But all the same, the sooner I get the dummy back into my own
hands the better, for I don’t think—”
At this point I broke off my meditations abruptly. I had been
sitting in full view of Professor Lawrance’s door, and just then I saw
him put his head out, look up and down the street as if to see
whether he could safely be away for a few minutes without the
probability of a customer popping in, and then cross the road in the
direction of the nearest publichouse.
“If I’m to make the exchange, it’s now or never,” I said, snatching
up the letter from Mrs. Burgoyne which, after copying, I had put
back into its envelope and resealed. In another half-minute I had
crossed the road and was ascending the stairs which led to Professor
Lawrance’s hair-cutting establishment.
CHAPTER XVIII
I BECOME A HAIRDRESSER’S ASSISTANT
To replace the dummy letter by the original and to pocket the former
did not take long, and as no step upon the stair announced the
Professor’s return I thought I might as well avail myself of the
opportunity of ascertaining anything that was to be learnt about his
other correspondents. With this end in view I put out my hand to
take down the packet again when a voice behind me said:—
“Wot a hinterest he do take in correspondence to be sure. Be
damned if he ain’t at ’em again!” And as I turned round I saw the
Professor in the act of closing the door, locking it, and putting the
key in his pocket.
“Now then, Mr. ’Enery Watson,” he said, with an ugly look upon his
face, “you and me ’as got to come to a hunderstanding. You comes
here very haffable like a-wanting to back a ’orse, with a
hintroduction from Mr. ’Enery Morrison, o’ Doncaster. Tall man, clean-
shaved, small heyes, wore a fawn coat and a billycock ’at, did he?
Ah! I knows ’im—Valker’s ’is name. ’Orses!”—this with scorn too
withering to be expressed by means of pen and ink—“You know
hanythink about ’orses! Why, yer sneakin’ goat, there ain’t a knacker
in the cats’-meat yard wot wouldn’t put ’is ’eels in yer face if ’e ’eard
yer talk about a gee-gee!”
He looked me up and down contemptuously for a moment, and
then with a sudden accession of fury, and with the sneer in his voice
changed to a snarl, said:—
“Yer come ’ere, do yer, a-spying and a-prying, and takes rooms
over the way to keep a watch upon me and my customers. And yer
want to get yer ’and on them letters there, so as to find some
hevidence to lay hinformation agin me, do yer? Think I didn’t know
yer was a-watchin’ me through the korfey palis winder? That’s wot I
went out for. I knew as yer’d be slippin’ over ’ere direckly my back
was turned. But I copped yer, yer slinkin’ toad! and yer ain’t got
nothink to lay hinformation on; and I’ll take care yer don’t!”
“My good man,” I replied quite coolly, “don’t distress yourself
unnecessarily. I know very well that you are carrying on illegal
transactions, and I could make things uncomfortable if I chose to
give the police a hint. But I’m not a detective, and I don’t concern
myself one way or the other with your doings, legal or illegal. What I
came here to find out is purely a private family affair, and has
nothing in the world to do with you or your betting business. A man
I know has disappeared, and his family are anxious to get news of
him. I’ve got an idea that he is in Stanby, and that he is having
letters addressed to your care under an assumed name. Now look
here. You’ve got it in your power to spoil my game, I admit; and I’ve
got it in my power to give the police a hint that might be
inconvenient to you. But why should you and I quarrel? Why
shouldn’t we do a little business together to our mutual benefit? I
can pay for any help you give, and if you’ll work with me I’ll
guarantee that your name shan’t be mentioned, and to keep my
mouth shut about any little business transactions of your own which
you’re engaged in. Well, what is it to be? Will you accept my offer or
not? You get nothing by refusing, and gain a good deal by accepting.
You run this show to make money, and not for pleasure, I take it;
and I’m ready to put a good deal more money in your pocket than
you’d make in the general way, and not to interfere with your usual
business either. I shouldn’t have supposed it wants much thinking
about.”
“Wot d’ yer call a good deal more money?” he asked shortly, but
not without signs of coming to terms.
“Five, fifteen, or twenty pounds.”
“An’ who is it yer after? There’s some of my pals as I wouldn’t give
no one the bulge on, and there’s some as I don’t care a crab’s claw
abawt.”
“My man isn’t one of your pals, I’m pretty sure, though I can’t tell
you his name—anyhow, not for the present,” I answered. “But who
are the pals you won’t go back on?”
“Is it George Ray?”
“No.”
“’Appy ’Arry?”
“No.”
“Alf Mason?”
“No.”
“Bob the Skinner?”
“No.”
“Fred Wright?”
“No.”
“Give us yer twenty pun’ then. I’m on. I don’t care the price of ’arf
a pint about none of the others.”
“Not so fast, my friend; you’ve got to earn the money before you
get it. And it’ll depend on yourself whether it’s ten, fifteen or twenty.
Now listen to me. What I want you to do is to make an excuse for
me to stay in your shop, so as to get a look at the people who come
for letters. You must pretend to engage me as your assistant, and fix
me up in a white apron, and so on. If any one asks questions you
can say I’m a young man who’s come into a little money and wants
to drop it in starting a hairdressing establishment, and I’ve come to
you to help me do it. You can tell them that you don’t let me cut any
of your regular customers, but that I make myself useful by
stropping the razors, lathering the ‘shaves,’ and practising hair-
cutting on odd customers and schoolboys. I could do that much, I
think, without betraying myself. The sooner we begin the better.
Give me a white apron, if you’ve got one to spare, and I’ll put it on
straight off. Here’s five pounds down to start with, and I’ll give you
another five for every week I’m here. Is it a bargain?”
“No, it ain’t. Ten pun’ down, and ten pun’ a week’s my figger, and
no less. I ain’t a-going to injure my business by taking hamitoors to
learn the business on my customers out of charity. Them’s my terms.
Yer can take ’em or leave ’em, as yer like.”
In the end we compounded the matter for ten pounds down and
five pounds weekly, and having arrayed myself in a white apron and
a canvas coat, braided red, which the Professor tossed me from a
drawer, I assumed those badges of office—the shears, shaving-brush
and comb—and took my place behind the second operating chair to
await customers and developments.
CHAPTER XIX
“ARE THERE ANY LETTERS FOR HENRY
JEANES, PLEASE?”
The Professor was in such huge good humour at the success of his
ruse that when we returned together to the hair-cutting
establishment he was almost inclined to be genial, especially as I
took the joke in good part, and frankly admitted that I had never
been so “let through” before. So friendly was he, in fact that he
readily agreed to my proposal that I should go over the way and
bring back a bottle of something to ease his cough; and after I had
pledged “Downy Tom,” and expressed the intention of getting up a
little earlier in the morning the next time I meant trying to steal a
march upon him, and “Downy Tom” had pledged me in what—in
delicate allusion to recent events—he humorously termed pigeon’s
milk, but which was in reality the best Old Tom, we fell to discussing
events almost confidentially.
“So it is Jeanes as yer after—as I always suspected, though you
never harsked questions about him direct, but only as if by haccident
and among the others” he said, as he lit his pipe. “It ’ud have saved
a lot of trouble if yer’d told me so at fust.”
“What do you mean by ‘saved trouble’?” I asked.
“Why, if I’d ’ave knowed it was Jeanes for certain, I’d ’ave ’elped
yer—for a consideration, of course. I only took yer into the shop
because I meant to find out who yer was hafter. Jeanes ain’t nothink
to me; but there is some of my pals as I wouldn’t have no ’arm
come to, not for a pot o’ money. And I knew if I ’ad yer there I could
find out who it was yer wanted, and give ’im the tip if it was a pal.
Why, I’ve been a-playin’ with yer all this time—a-playing hoff first
one name and then another to see if it was your bloke. Then when I
began to suspect it was Jeanes, I planned the little game I played
yer ter-day—an’ didn’t yer tumble prettily! Ha, ha, ha, ha!” and off
the Professor went again into a paroxysm of laughter at my
expense.
It suited my purpose to humour him, so I joined good-humouredly
in the laugh against myself; but as a matter of fact I had not been
quite such a “pigeon” as the Professor supposed. Up to a certain
point the scoring had been in my favour, and not in his, for I had
succeeded, not only in intercepting an important letter which had
been sent to his care, but also in returning that letter—after I had
made myself acquainted with its contents—to the place whence I
took it, so that it might reach the hand of the person to whom it was
addressed.
But I knew very well that, should the Professor’s suspicions be
once aroused—as must have been the case after he detected me in
the act of examining the letters—I should not only never again be
allowed to go within the reach of the rack where he kept them, but
should in all probability be refused admission to his shop. Hence I
had no choice but to adopt the somewhat daring course of openly
offering him a bribe to take me into his service. If he really were
Mullen’s confederate he would already have had cause to suspect my
motives, but if, on the other hand, Mullen and the Professor had no
other connection than that the former was having his letters
addressed to the latter’s shop, it was quite within the bounds of
possibility that the worthy Professor would, for a consideration, be
prepared to tell me all he knew about the customer in question. That
the object of the leading questions he had from time to time put to
me was to discover whom I was in search of, I had been well aware,
although I freely admit that I had been, as I have said, “let through”
in regard to the man who had called for Jeanes’s letter.
When the Professor had had his laugh out I asked him quietly if
he knew that the letter for Jeanes was gone.
“Do I know it’s gone, yer bally fool?” he said. “Why, of course I do.
Wasn’t it me came and called yer for it just now when I had such a
bad korf; and didn’t yer say there wasn’t any letter?”
“Yes, yes,” I said, looking rather foolish; “of course I know that
you came and asked for a letter, and that I told you there wasn’t
one, but I didn’t know that you knew that the letter was really
gone.”
“Well, considerin’ as it was me took it when I came back to get my
pipe, I ought ter know,” he answered, and then, with a sudden
change of manner, “Look ’ere, Watson, or whatever yer name is, I
think us two can do a deal together. Yer want to get ’old of ’Enery
Jeanes, don’t yer?”
I nodded.
“Supposin’ I knew where ’e was to be found at this very minute,
wot ’ud yer give me for the hinformation?”
“Ten pounds,” I answered.
He snorted.
“Can’t be done under twenty, ready money. Give us yer twenty
and I’ll tell yer.”
“No,” I said. “Take me to where Jeanes is to be found, wherever it
is, and I’ll give you, not twenty, but fifty pounds, as soon as I’m sure
it is the right man. I swear it, so help me God! and I won’t go back
on my word.”
His eyes sparkled.
“Yer a gentleman, I b’lieve,” he said, “and I’ll trust yer. But yer
must keep my name out of it. Now listen. When I went down the
stairs to get that ’arf-pint I met Jeanes a-comin’ up for ’is letters. I
guessed it was ’im yer was after, and I wasn’t going to ’ave no
harrests nor rows in my shop. Besides, if yer wanted ’im bad, I
guessed yer’d be willin’ to drop money on it and if there was any
money to be dropped I didn’t see why I shouldn’t be the one to pick
it up.”
Here was news, indeed! If the Professor was to be believed—and,
notwithstanding my recent experience, I failed to see what motive
he could have for misleading me in this instance—the man I was in
search of had been in the town, and in that very house, scarcely
more than two hours ago! And I had been sitting there idly, when
every moment, every second, was precious!
“Go on! go on!” I said excitedly. “Tell me the rest as fast as you
can. There’s not a moment to spare. I’ll see you don’t lose by it.”
He nodded and continued, but still in the same leisurely way.
“Well, I harsked Jeanes to wait while I fetched the letter. That’s
wot I came back to get my pipe for. Yer remember I took the letters
down and pretended to count ’em? Well, I sneaked it then and gave
it ’im. He gave me a sovereign, and said there wouldn’t be any more
letters comin’ for ’im, and ’e shouldn’t be calling at the shop no
more. Then ’e harsked me wot time the next train left for London,
and I told ’im in a quarter of an hour, and ’e said that wouldn’t do,
as ’e ’adn’t ’ad no lunch and was starvin’ ’ungry. So I told ’im there
wasn’t another for two hours and a ’arf, and ’e said that would do
capital, and where was the best place to get dinner. I told ’im the
Railway Hotel, and ’e went there, ’cos I followed him to make sure.
Then I whipped back and played that little game on yer just to make
sure it was Jeanes yer wanted. And now I guess that fifty pounds is
as good as mine. Jeanes’ll be at the hotel now, or if ’e’s left there we
can make sure of ’im at the station when ’e catches the London
express. Wot d’ yer want him for? Looks a ’armless, pleasant kind of
bloke, and very pleasant spoken.”
“What’s he like?” I said.
“Youngish, fair, and big eyes like a gal’s. Wore a blue serge suit
and a white straw ’at.”
“Clean shaven?” I asked.
“Yes, clean shaved; or any’ow, ’e’d no ’air on ’is face.”
“That’s the man,” I said. “Well, come along, we’ll be off to the
hotel. Do you know any one there, by-the-bye?”
“I knows the chief waiter. ’E often ’as five bob on a ’orse with me.”
“All right. Then you’d better go in first and see your friend the
waiter and find out where Jeanes is. If he heard anybody asking for
him by name in the hall he might think something was wrong and
make a bolt. Then you’d lose your fifty pounds—which would be a
pity.”
The Professor assented, and we started for the Railway Hotel, he
walking in front as if without any connection with me, and I some
twenty paces behind. When the swing doors closed upon his bulky
figure I stopped, as we had arranged, and pretended to look into a
shop window until he should rejoin me.
I had been nervous and excited when we set out, but now that
the crisis had come, and I was so soon to stand face to face with
Henry Jeanes alias James Cross, alias James Mullen, alias Captain
Shannon, I was as cool and collected as ever I was in my life.
The next moment the Professor came hurrying out, with a face on
which dismay was plainly written.
“’E’s been there, right enough,” he said, all in a burst, and with a
horrible oath, his features working meanwhile with agitation, the
genuineness of which there was no mistaking. “But instead of ’aving
lunch, as ’e told me ’e should, the —— ’ad a glass of sherry and
caught the 12.15 express to London, and ’e’s more than got there by
now, rot ’im!”
CHAPTER XXI
HOW I STRUCK JAMES MULLEN’S TRACK