Hands-On Programming with R

Errata for Hands-On Programming with R

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Printed
Page x
2nd para

Duplicate 'any' in the sentence: "I would not recommend that any any ..."

William Byrd  Sep 02, 2014 
Printed
Page 2
9th line from top

tiny typos; ... seem frivilous, think of ... -> ... seem frivolous, think of ...

Yukitoshi Fujimura  Aug 21, 2014 
Printed, PDF
Page 5
second paragraph

"The colon operator (+) returns´┐Ż" should be "The colon operator (:) returns´┐Ż"

Brian Drye  Jul 30, 2014 
Printed
Page 11
Figure 1-4

The operation shown in t he figure is multiplication while the discussion preceding it is addition. The results shown is incorrect for multiplication (but correct for addition).

Note from the Author or Editor:
In Figure 1-4, each of the multiplication symbols (*) should be changed to an addition symbol (+). There are 10 total that should be corrected.

Dan Watts  Aug 07, 2014 
Printed, PDF
Page 11
4th line bottom

Just need [,] notation for both column and row; die%*%die ## 91 should be die%*%die ## [,1] ##[1,] 91

Note from the Author or Editor:
Yes, the code at the bottom of page 11 should read: die %*% die ## [,1] ## [1,] 91

Yukitoshi Fujimura  Aug 21, 2014 
Printed
Page 19
Second paragraph from bottom

In the second sentence of the second paragraph from the bottom, the word "function" (written in "code" font) is split between two lines (func... tion). Is it possible to fit this word on one line?

Garrett Grolemund
Garrett Grolemund
O'Reilly Author 
Dec 11, 2014 
Printed
Page 27
3rd paragraph

"Numbers covered by a tall bar are no more common than ...." should be "Numbers covered by a tall bar are more common than ...."

Dan Watts  Aug 07, 2014 
Printed
Page 39
After the second paragraph of text

The book reads: sum(num) ## 6 It SHOULD say: sum(int) ## 6

Garrett Grolemund
Garrett Grolemund
O'Reilly Author 
Dec 11, 2014 
Printed
Page 40
3rd paragraph

"Integers are defined more precisely in your computer's memory than doubles (unless the integer is 'very' large or small)." I understand what is written for large integers, but small (or very small) integers are close to zero. Perhaps it should have been "'very' large positive or negative".

Note from the Author or Editor:
Change text to read: "Integers are defined more precisely in your computer's memory than doubles (unless the integer is very large)."

Dan Watts  Aug 07, 2014 
Printed
Page 44
Code at bottom of the page with Spanish numbers from 1-6

"quatro" should be spelled "cuatro." It is listed twice in the code.

Garrett Grolemund
Garrett Grolemund
O'Reilly Author 
Dec 11, 2014 
Printed
Page 82
Last paragraph ("Next, you can use...")

On the second line of that paragraph, "individually" is misspelled. (It has an extra u.)

Garrett Grolemund
Garrett Grolemund
O'Reilly Author 
Dec 11, 2014 
Printed
Page 105
First paragraph, second line

"Pristine" is misspelled. (It has an extra i.)

Garrett Grolemund
Garrett Grolemund
O'Reilly Author 
Dec 11, 2014 
PDF
Page 118
"If a subtask seems complicated, try to divide it again into even subtasks that are even more simple"

"If a subtask seems complicated, try to divide it again into even subtasks that are even more simple" should be "If a subtask seems complicated, try to divide it again into smaller subtasks that are even more simple"

Note from the Author or Editor:
Change "If a subtask seems complicated, try to divide it again into even subtasks that are even more simple" to "If a subtask seems complicated, try to divide it again into smaller subtasks that are even more simple"

Eric Watt  Dec 13, 2014 
Printed
Page 125
Numbered list at the top of the page

Numbers 2 and 3 are out of sequence in the list. 1) Test whether the symbols are three of a kind. 2) Look up the prize for three of a kind based on the common symbol. 3) Test whether the symbols are all bars.

Garrett Grolemund
Garrett Grolemund
O'Reilly Author 
Dec 11, 2014 
PDF
Page 127
Middle of page

Original wrong code: length(unique(symbols) == 1) Correct code: length(unique(symbols)) == 1

Dennis Yap San Hong  Oct 07, 2014 
Printed
Page 134
1st paragraph

"And when cherries equals three ..." should be "And when cherries equal two ..."

Dan Watts  Aug 10, 2014 
Printed
Page 137
Code just above "Summary"

The last example of the play function is missing a double B. It should read: play() ## "BB" "BB" "BB" ## 25

Garrett Grolemund
Garrett Grolemund
O'Reilly Author 
Dec 11, 2014 
Printed
Page 163
Second paragraph from bottom

The second to last paragraph ("On the first run, the for loop...") should end with a period and not a colon.

Garrett Grolemund
Garrett Grolemund
O'Reilly Author 
Dec 11, 2014 
PDF
Page 178
Code examples

Code does not run as written. Example given is system.time( output <- rep(NA, 1000000) for (i in 1:1000000) { output[i] <- i + 1 } ) Had to be modified to system.time({ output <- rep(NA, 1000000) for (i in 1:1000000) { output[i] <- i + 1 } })

Note from the Author or Editor:
Add a set of braces immediately inside the parentheses that follow system.time (like this): system.time({ output <- rep(NA, 1000000) for (i in 1:1000000) { output[i] <- i + 1 } })

Eric Watt  Dec 13, 2014 
Printed, PDF
Page 180
last paragraph, first sentence

typo: "(matix-ized?)" should be "(matrix-ized?)"

Brian Drye  Aug 07, 2014 
PDF
Page 180
1st paragraph

'In fact, the simulation takes 342,308 seconds to run, which is about 5.7 minutes' Should be 342.308 seconds.

Note from the Author or Editor:
342,308 needs to be changed to 342.308

Eric Watt  Dec 13, 2014 
Printed
Page 192
Third paragraph

In the sentence, "If this is your first time installing a package...", delete the extraneous "of." It should say: "... choose an online mirror to install from."

Garrett Grolemund
Garrett Grolemund
O'Reilly Author 
Dec 11, 2014