Learn R: As a Language

Image of the book cover

ISBN 9780367182533

My book on R was published on 28 July 2020. The R package ‘learnrbook’ available through CRAN contains data and the R code scripts and chunks from the book. The book has now its own website.

In the book’s website you will find free supplementary chapters as downloadable PDF files and other material complementing the book.

[2022-06-24] Last week I started updating the book manuscript for a 2nd printing/edition. For the time being I have been adding several diagrams and flow charts, expanding the text to improve clarity and fixing all typos in text and code that I am aware of. I am also addressing the new features in R 4.2.0 and changes to the packages used in the examples. Please, do share with me anything you would like changed from the current edition and report any mistakes you may have found. All useful contributions will be acknowledged. Thanks in advance!

[2022-08-14] You may think that learning the ‘tidyverse’ could be enough. My experience tells it is not, and that a good understanding of the R language keeps one out of trouble even when using the ‘tidyverse’. I came accross an old post by Joel Spolsky that explains why this is the case in general: higher levels of abstractions “leak”, abstractions are imperfect, and the underlying complexity seeps through. With respect to R and the ‘tidyverse’, the evolving paper on Teaching R in a Kinder, Gentler, More Effective Manner by Norm Matloff is very clear about this.

[2022-08-24] The book has been listed as a “2021 CHOICE Outstanding Academic Title Award Winner” which makes me very happy and encourages my work on a 2nd edition.

Book and package: Learn R …as you learnt your mother tongue

Book cover

Book cover

Book draft of 2017-05-14 and ‘learnrbook’ package 0.0.2.

My book titled Learn R …as you learnt your mother tongue is gradually approaching completion, but the text is not yet polished. Today’s milestone is that the first version of the companion R package has been accepted for distribution through CRAN.

In the draft version I uploaded today, published as earlier ones through Leanpub, approximately 95% of the book content is included. Today’s version differs from earlier ones in that as now the original datasets and files used in examples are now in package ‘learnrbook’, the example code has been edited to make use of it. The package is since yesterday in CRAN. The updated version of the book also tracks improvements in version 0.2.15 of my package ‘ggpmisc’, which is since today in CRAN.

The PDF of this updated draft of the book is available at http://leanpub.com/learnr for whatever price you would like to pay for it (including for free). However, paying even as little as 1€ for your copy would go a long way towards supporting the expenses of running this web site.

Book: Learn R …as you learnt your mother tongue

Book cover

Book cover

Draft of 2017-03-26

My book titled Learn R …as you learnt your mother tongue is nearly complete, but the text is not yet polished.

In the fifth draft version, published through Leanpub, approximately 95% of the book content is included.

The PDF of this updated draft of the book is available at http://leanpub.com/learnr for whatever price you would like to pay for it (including for free). However, paying even as little as 1€ for your copy would go a long way towards supporting the expenses of running this web site.

Status as of 2017-03-26. Except for the chapter on data manipulation, all chapters are close to their final form.

Draft of 2017-04-08

Two updates released to Leanpub on 4 April and 8 April, respectively. Chapter on data manipulation is now complete but text is still is rather rough.

Draft of 2017-04-14

More updates to file at Leanpub. Indexing of functions is mostly done. Polishing of text and code examples has started. A few additional code examples added. R package containing original data used in examples in the book is nearly ready for first release.

 

Book: Learn R …as you learnt your mother tongue

Book cover

Book cover

Draft 004

I have pre-published my notes on R as a future book at Leanpub titled Learn R …as you learnt your mother tongue.

In the fourth draft version, published through Leanpub, approximately 85% of the book contents are included.

The PDF of this updated draft of the book is available at http://leanpub.com/learnr for whatever price you would like to pay for it (including for free).

Status as of 2017-02-09. Wrote section on ggplot2 themes, and on using system and Google fonts in ggpplots with the help of package ‘showtext’. Expanded section on ‘ggplot2’’s annotation , and revised some sections in the “R scripts and Programming” chapter. Started writing the data chapter. Wrote draft on writing and reading text files. Several other smaller edits to text and a few new examples.

Draft [2017-02-15]

Completed first part of data chapter including importing data from files in different formats and on reading files or web pages from the internet.

Book: Learn R …as you learnt your mother tongue

Book cover

Book cover

Draft 003

I have pre-published my notes on R as a future book at Leanpub titled Learn R …as you learnt your mother tongue.

In the third draft version, published through Leanpub, approximately 85% of the book contents are included.

The PDF of this updated draft of the book is available since this morning at http://leanpub.com/learnr for whatever price you would like to pay for it (including for free).

Status as of 2017-01-17: Added “playground” exercises to the chapter describing ‘ggplot2’, and converted some of the examples earlier part of the main text into these playground items. Added icons to help readers quickly distinguish playground sections, information sections, warnings about things one needs to be specially aware of and boxes with more advanced content. Added to the sections scales and examples in the ‘ggplot2’ chapter details about the use of colors in R and ‘ggplot2’ 2. Removed some redundant examples, and updated the section on plotmath . Added terms to the alphabetical index. Increased line-spacing to avoid uneven spacing with inline code bits.