If your package uses testthat for unit testing, as many packages on CRAN, you might have wondered at least once about where to put “things” you wished to use in several tests: a function generating a random string, an example image, etc. In this blog post, we shall offer a round-up of how to use such code and files when testing your package. Code called in your tests Remember our post about internal functions in R packages?

Read more...

An alternative title for this post would be “the very meta one”. 😉 In this post we shall present some principles and tips used in preparing posts on this blog, that might be useful for problem solving for R package developers and for blogging here or elsewhere. Choosing and finding relevant topics A topic is relevant if it’s related to R package development, and if it’s not covered extensively elsewhere: unless a blog post can provide more context, presentation of newer tooling, a new perspective, we are not going to duplicate existing content.

Read more...

Ever wondered where packages in general and their code in particular go when you run something like install.packages()? This post is for you! Where do installed packages live? Packages are installed at the path you give as lib argument to install.packages() (or to any remotes::install_ function, that will pass them on to install.packages()); most often since you won’t give any, at the first path returned by .

Read more...

JS and R, what a clickbait! Come for JS, stay for our posts about Solaris and WinBuilder. 😉 No matter how strongly you believe in JavaScript being the language of the future (see below), you might still gain from using it in your R practice, be it back-end or front-end. javascript is rly the future and it's evolving closer and closer to some of my cherished older languages . it will outlive python (and R) by a long shot.

Read more...

Yet another post with a focus on package documentation! This time, we’ll cover vignettes a.k.a “long-form package documentation”, both basics around vignette building and infrastructure, and some tips for more maintainer- and user- friendliness. What is a vignette? Where does it live? In this section we shall go over basics of package vignettes. Vignette 101 In the “R packages” book by Hadley Wickham and Jenny Bryan, the vignettes chapter starts with “A vignette is a long-form guide to your package.

Read more...