Errata

R for Data Science

Errata for R for Data Science, Second Edition

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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Other Digital Version Chapter 1. Data visualization
Chapter 1. Data visualization

The code is for mtcars/cars dataset but the figures are for another dataset (ex. Diamond). I closely follow the Authors, and I hope the Authors fix this issue soon. Thanks

Sarangan Ravichandran  Feb 03, 2023 
Other Digital Version Ch. 10
Ch. 10

Like Ch.1, most plots in Ch.9 do not match the code...

Anonymous  Mar 08, 2023 
Printed Page pages 90 - 93
Figure 6-2 on page 90 and script on page 93

I am learning r through this excellent book (printed and online versions simultaneously), and I got the following error message when I ran the Diamond-script on page 93:

Error in file.exists(pythonPath) :
file name conversion problem -- name too long?

Google indicated that many people have got this message under various circumstances, without getting good answers. After quite a while I found this extremely simple 2023-solution:

In terms of your Figure 6-2 options, additionally, goto/mark "Python", and untick the option "Automatically activate ...".

This solution is in fact indicated indirectly at the end of rstudio / renv / issue #1124 through a link to a Stack Overflow question/answer.

In view of the simplicity of this solution I think you should consider mentioning it in connection with your Figure 6-2. Or even simpler (from my limited perspective) perhaps one could let this unticked option be the default.

However, I would be grateful if I could get a confirmation that this unticking does not have other implications than removing the error (unless one one wants to go deeper into python), as stated in the answer/solution.

Olivier Guilbaud  Sep 29, 2023 
Printed Page Page 174
2nd para

In the trend_text example, the input string already has a \n in it, but it is the
function of the str_wrap() to add this in. So the \n can be removed from the literal
string.

Phil Leverton  Feb 15, 2024