Handbook on photobiological calculations with R

Book coverA handbook on how to do calculations used in photobiological research with R has been under preparation for a long time. An  80% complete version has been available through LeanPub for several years. The book describes the use of our suite of R packages and also of functions from base R and a few other packages available through CRAN. I (Pedro J. Aphalo) am the lead author, while Andreas Albert, T. Matthew Robson and Titta Kotilainen have contributed text and examples and feedback.

Although we haven’t had time to finish writing the book, I have been checking that the code examples work with current versions of R and packages. Rather recently I made small edits to a few code chunks that had stopped working and uploaded the new version of the PDF file to LeanPub.

Some minutes ago I tried to build all examples with R 4.2.o, a major update to R released some days ago. R 4.2.o contains a bug, that unluckily prevents a couple some examples in the book from running under MS-Windows. The already available patched version of R 4.2.0 solves this problem. Anyway, this bug affects only a very specific use related to data acquisition.

The book is sold for the amount the buyer wishes to pay, including getting it for free.

learnrbook 1.0.2

Package documentation web site at: https://docs.r4photobiology.info/learnrbook/

This is the second version submitted to CRAN for the book as published in the R Series.

This update adds .R files with the code from all chunks in the book, including a few not visible. There are some small edits to the documentation.

NOTE: The updated package is on its way to CRAN.

Please raise issues concerning bugs or enhancements to this package through Bitbucket https://github.com/aphalo/learnrbook-pkg/issues

 

learnrbook 1.0.1

Package documentation web site at: https://docs.r4photobiology.info/learnrbook/

This is the first version submitted to CRAN for the book as published in the R Series.

Versions starting from 1.0.0 are for the book as published in the R Series. Earlier versions were for various partial drafts of the book, as pre-published through LeanPub. The book was published a few of weeks ago, but shipping has started in the last few days.

NOTE: The updated package is on its way to CRAN.

Please raise issues concerning bugs or enhancements to this package through Bitbucket https://bitbucket.org/aphalo/learnrbook-pkg/issues

Word cloud figure from LaTeX index entries

I created the word cloud on the cover of “Learn R as a Language” using an R script that takes as input the file for the book index, as generated when creating the PDF from the LaTeX source files. This input file contained quite a lot of additional information, like font changes and page numbers that needed to be stripped into a clean list of words. Only later I realized that it would have been easier to produce a cleaner word list to start with. So, I first present the code revised to work with a simpler word list. This is actually tested with the book files to work. If you want to do something similar for your own book, follow the revised code in first section below. If you want to see the “hacked-up” code I really used for the cover as included in the book, it is in the second section below.

Continue reading