Articles by Posts on R-hub blog

Lazy introduction to laziness in R

February 12, 2025 | Posts on R-hub blog

In the programming world, laziness can often be a good thing: it is both a human quality that can motivate automation efforts, and a programming concept that avoids wasting resources such as memory. Now, when reading code or documentation, seeing the w... [Read more...]

R-hub v2

April 10, 2024 | Posts on R-hub blog

After eight years, we are retiring the current version of R-hub, in favor of a better, faster, modern system. We call the new system R-hub v2. R-hub v2 runs R package checks on GitHub Actions. R-hub v2 works best if your R package is in a GitHub reposi... [Read more...]

Update on mocking for testing R packages

March 20, 2024 | Posts on R-hub blog

This blog featured a post on mocking, the art of replacing a function with whatever fake we need for testing, years ago. Since then, we’ve entered a new decade, the second edition of Hadley Wickham’s and Jenny Bryan’s R packages book was published, and mocking returned to ... [Read more...]

Cliff notes about the cli package

November 29, 2023 | Posts on R-hub blog

We’ve both coincidentally dipped our toes in the wonderful world of pretty messaging with cli. cli::cli_alert_success("marvellous package adopted!") #__ ✔ marvellous package adopted! In this post, we transform the hurdles we encountered in a... [Read more...]

System Dependencies in R Packages & Automatic Testing

September 25, 2023 | Posts on R-hub blog

This post has been cross-posted on the Epiverse-TRACE blog. In a previous post, we discussed a package dependency that goes slightly beyond the normal R package ecosystem dependency: R itself. Today, we step even further and discuss dependencies outside of R: system dependencies. This happens when packages rely on external ... [Read more...]

Coding style, coding etiquette

March 20, 2022 | Posts on R-hub blog

Do you indent your code with one tab, two spaces, or eight spaces? Do you feel strongly about the location of the curly brace closing a function definition? Do you have naming preferences? You probably have picked up some habits along the way. In any c... [Read more...]

Caching the results of functions of your R package

July 29, 2021 | Posts on R-hub blog

One principle of programming that’s often encountered is “DRY”, “Don’t Repeat Yourself”, that encourages e.g. the use of functions over duplicated (read: copy-pasted and slightly amended) code. You could also interpret it as don’t let the machine repeat its calculations if useless. How about for a ... [Read more...]

RSQLite concurrency issues — solution included

March 12, 2021 | Posts on R-hub blog

SQLite is a great, full featured SQL database engine. Most likely it is used more than all other database engines combined. The RSQLite R package embeds SQLite, and lets you query and manipulate SQLite databases from R. It is used in Bioconductor data packages, many deployed Shiny apps, and several ... [Read more...]

State of R packages in your library

September 2, 2020 | Posts on R-hub blog

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 ... [Read more...]

JavaScript for the R package developer

August 24, 2020 | Posts on R-hub blog

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 ... [Read more...]

Optimal workflows for package vignettes

June 2, 2020 | Posts on R-hub blog

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 ... [Read more...]
1 2

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)