Recommend resources for developing my first R package?

What resource(s) should I recommend to a computer scientist who is getting intrigued about developing their first R package and possibly contributing to rOpenSci?

They asked:
"Most books on R I find are based on using R to practically solve a specific problem (i.e. how do I do X using R, for example “R for Data science”). I’m more interested in a book that tackles R from a more general perspective. For example everything you would need to build a stand alone, well tested, fast and efficient R package.

I would be interested in a book with most of the following:

  1. What are the fundamental datatypes in R (strings, floats, vectors, matrices, data frames, etc.)
  • What are the advantages and disadvantages to these datatypes with respect to time efficiency and memory efficiency?
  • Useful built in functions for object oriented datatypes.
  1. Language paradigms
  • Functional vs procedural programming in R; advantages and disadvantages
  1. Best practices for developing R software.

In summary a book on R which is similar to most introductory books on other languages."

2 Likes

Thanks to @noamross for recommending these:

  1. Advanced R: http://adv-r.had.co.nz/
  2. R packages: http://r-pkgs.had.co.nz/

The first will cover 1+ 2, the second 3.

Efficient R: https://csgillespie.github.io/efficientR/ may also be of interest.

Also, “Testing R Code” by Richard Cotton came out today: https://www.crcpress.com/Testing-R-Code/Cotton/p/book/9781498763653

1 Like

@stefanie @noamross Thanks.

I also found this course: https://www.coursera.org/specializations/r

This Specialization covers R software development for building data science tools. As the field of data science evolves, it has become clear that software development skills are essential for producing useful data science results and products. You will obtain rigorous training in the R language, including the skills for handling complex data, building R packages and developing custom data visualizations. You will learn modern software development practices to build tools that are highly reusable, modular, and suitable for use in a team-based environment or a community of developers.

1 Like

@LeeBergstrand and this, thanks to heads-up from @maelle: Want to integrate so your #rpackage builds when you push to GitHub? http://rdpeng.github.io/RProgDA/continuous-integration.html

1 Like

The book is the book of the course mentioned above :slight_smile:

For continuous integration Julia Silge’s blog post is really good http://juliasilge.com/blog/Beginners-Guide-to-Travis/ I’d have loved to read it when I first set up continuous integration!

2 Likes

Hey @Stefanie - thanks for starting this thread. I am also thinking of starting my own package and I found this blog post very inspiring to do just so: https://hilaryparker.com/2014/04/29/writing-an-r-package-from-scratch/

Hi @PWaryszak. Thanks for adding that link here. It’s a popular one!

The rOpenSci blog has some posts written by people who have developed packages and submitted them to rOpenSci for open peer review. They give interesting different perspectives on package development. These links take you to some of them: https://ropensci.org/tags/reviewer/ and https://ropensci.org/tags/onboarding/

Cheers

1 Like

Another resource just heard about http://www.mjdenny.com/R_Package_Pictorial.html

H/T @maelle

2 Likes

I found the pictorial when listing resources for this blog post of mine which in my humble opinion is an useful read :grin: http://www.masalmon.eu/2017/12/11/goodrpackages/

2 Likes

I’ve used the resources mentioned here and in my own blog post for this section https://ropensci.github.io/dev_guide/contributingguide.html#pre-requisities of the contributing guide chapter of the rOpenSci gitbook about package development.

1 Like