Publications by Posts on R-hub blog

About URLs in DESCRIPTION

09.12.2019

Among DESCRIPTION usual fields is the free-text URL field where package authors can store various links: to the development website, docs, upstream tool, etc. In this post, we shall explain why storing URLs in DESCRIPTION is important, where else you should add URLs and what kind of URLs are stored in CRAN packages these days. Why put URLs in DES...

4446 sym R (3107 sym/7 pcs)

Internal functions in R packages

11.12.2019

An R package can be viewed as a set of functions, of which only a part are exposed to the user. In this blog post we shall concentrate of the functions that are not exposed to the user, so called internal functions: what are they, how does one handle them in one’s own package, and how can one explore them? Internal functions 101 What is an inte...

6577 sym R (3596 sym/8 pcs)

R-hub usage in a few figures

18.12.2019

Earlier this year when launching this blog we explained why R package developers should care about R-hub. So, does anyone care? ???? Yes! Let’s summarize R-hub usage. Usage data As specified in our use terms we do not store user data. However we do store some usage data. In the table loaded below, emails and packages are unidentified – but yo...

3557 sym R (2698 sym/7 pcs) 6 img 2 tbl

From Shock to Competence: How Not to Panic When You Receive E-mail from CRAN about Failed Checks

07.01.2020

This post was contributed by Julia Romanowska, Researcher at the University of Bergen, Norway. Thank you, Julia! I’m involved in development of the Haplin R package, which enables fast genetic association analyses (very useful for those involved in genetic epidemiology research). We are a team of scientists that have various background, from g...

5323 sym

Objects that feel mutable in R

21.01.2020

In R, most often, to change an object, you need to re-assign its new value to it. But sometimes, things feel different because objects are mutable or it seems they are, be it in base R code or in the code of packages. Why and how to provide a mutable API/interface in R code? In this blog post, we shall explore a few odd examples a few examples to...

6936 sym R (4245 sym/16 pcs)

Code examples in the R package manuals

26.01.2020

After posts exploring READMEs, URLs in DESCRIPTION, today we shall look at another important aspect of documentation: examples in the manual pages of your functions! Why write them, how to write them, and how to control their execution in different contexts (CRAN or not ????). Why write examples in manual pages? We’ve made the point for users d...

7576 sym R (414 sym/6 pcs)

Code generation in R packages

09.02.2020

If you use the same code three times, write a function. If you write three such related functions, set up a package. But if you write three embarrassingly similar functions… write code to generate their code for you? In this post, we’ll deal with source code generation. We’ll differentiate scaffolding from generating code, and we’ll prese...

11739 sym R (1758 sym/5 pcs)

Debugging: Signals and Subprocesses

19.02.2020

This is a short story about a non-trivial bug in the processx package, and how I fixed it. It is a good showcase of the some debugging tools. The bug processx is an R package to start and manage external processes. It is used by the callr package to run code in another R session. The original bug report by Will Landau has a nice, clean reproducib...

9516 sym R (6737 sym/20 pcs)

Persistent config and data for R packages

11.03.2020

Does your R package work best with some configuration? You probably want it to be easily found by your package. Does your R package download huge datasets that don’t change much on the provider side? Maybe you want to save the corresponding data somewhere persistent so that things will go faster during the next R session. In this blog post we s...

10564 sym R (2498 sym/8 pcs)

Everything you should know about WinBuilder

31.03.2020

If you’ve tried submitting a package on CRAN, you might have heard of WinBuilder, as it is mentioned in CRAN submission checklist. In this post inspired by reading R-package-devel archive, we shall go through important questions around WinBuilder. What is WinBuilder and why use it? As mentioned in its public-facing web page, WinBuilder ” prov...

4661 sym