Publications by Posts on R-hub blog
Retries in API packages and reinventing the wheel
Web APIs can sometimes fail for no particular reason; therefore packages accessing them often add some robustness to their code by retrying calling the API a few times if there was an error. The two high-level R HTTP clients, httr and crul, offer ready-made sub-routines for such cases, but some developers like me have rolled their own out of igno...
6288 sym R (1124 sym/3 pcs) 6 img
Workflow automation tools for package developers
As a package developer, there are quite a few things you need to stay on top on. Following bug reports and feature requests of course, but also regularly testing your package, ensuring the docs are up-to-date and typo-free… Some of these things you might do without even pausing to think, whereas for others you might need more reminders. Some of...
9421 sym 2 img
Why and how maintain a NEWS file for your R package?
Your R package is doomed to evolve as you add new features and bug fixes. There is some value in cultivating a NEWS file as a response to package transformation. In this post, we shall go through why keeping track of changes, how to create and maintain a changelog, advocating for the NEWS.md format. Why cultivate a changelog? You will most probab...
7414 sym R (3360 sym/3 pcs)
Counting and Visualizing CRAN Downloads with packageRank (with Caveats!)
This post was contributed by Peter Li. Thank you, Peter! packageRank is an R package that helps put package download counts into context. It does so via two functions. The first, cranDownloads(), extends cranlogs::cran_downloads() by adding a plot() method and a more user-friendly interface. The second, packageRank(), uses rank percentiles, a no...
23788 sym R (5838 sym/30 pcs) 36 img
Checking your R package on Solaris
TL;DR To check your package on Solaris, call rhub::check() as usual and choose one of our Solaris builders. Bookmark this page, in case you get an email from CRAN about your package failing on Solaris. Oracle Solaris Oracle Solaris is a non-free Unix operating system. CRAN regularly tests R packages on Solaris 10. See this talk by Uwe Ligges i...
5569 sym
Non-standard files/directories, Rbuildignore and inst
Paragraphasing Writing R Extensions, an R package is “directory of files which extend R”. These files have to follow a standard structure: you can’t store everything that suits your fancy in a tarball you submit to CRAN. In this post we shall go through what directories and files can go on CRAN and how to navigate this while shipping everyt...
7134 sym R (4659 sym/8 pcs)
How to distribute data with your R package
Distributing data with an R package can be crucial for the package or even the only goal of a package: to show what a function can accomplish with a dataset; to show how a package can help tidy a messy data format; to test the package; for teaching purposes; to allow users to directly use the bundled data instead of having to fetch and clean the ...
7587 sym R (172 sym/2 pcs)
Optimal workflows for package vignettes
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 vigne...
14114 sym R (1694 sym/9 pcs) 2 tbl
JavaScript for the R package developer
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 o...
12442 sym R (723 sym/5 pcs)
State of R packages in your library
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()); mo...
5973 sym R (499 sym/2 pcs)