Publications by Econometrics and Free Software

Open source is a hard requirement for reproducibility

15.11.2022

Open source is a hard requirement for reproducibility. No ifs nor buts. And I’m not only talking about the code you typed for your research paper/report/analysis. I’m talking about the whole ecosystem that you used to type your code. (I won’t be talking about making the data available, because I think this is another blog post on its own.) ...

4781 sym R (82 sym/1 pcs) 4 img

Reproducibility with Docker and Github Actions for the average R enjoyer

18.11.2022

This blog post is a summary of Chapters 9 and 10 of this ebook I wrote for a course The goal is the following: we want to write a pipeline that produces some plots. We want the code to be executed inside a Docker container for reproducibility, and we want this container to get executed on Github Actions. Github Actions is a Continuous Integration...

13582 sym R (8238 sym/23 pcs) 4 img

Why and how to use JS in your Shiny app

30.09.2022

The snake biting its own tail Disclaimer: I’m a beginner at JS, so don’t ask me about the many intricacies of JS. I’ve been working on a Shiny app for work these past few weeks, and had to use Javascript to solve a very specific issue I encountered. Something for which, as far as I know, there is no other solution than using Javascript. The...

7085 sym R (6012 sym/5 pcs) 4 img

The {chronicler} package, an implementation of the logger monad in R

31.03.2022

Back in February I discussed a package I was working on which allowed users to add logging to function calls. I named the package {loudly} but decided to rename it to {chronicler}. I have been working on it for the past few weeks, and I think that a CRAN release could happen soon. Introduction So what does {chronicler} do? {chronicler} allows yo...

3915 sym R (7284 sym/15 pcs) 4 img

Why you should(n’t) care about Monads if you’re an R programmer

10.04.2022

Introduction: functions To understand Monads, I think it’s useful to first think about functions; why do we use functions? Why don’t we simply write scripts with the required operations one after the other? For instance, to compute the average height by species in a data set of individuals from the famous space opera “Star Wars”, we could...

13280 sym R (10230 sym/20 pcs) 4 img

Self-documenting {ggplot}s thanks to the power of monads!

14.05.2022

Hey kid, fancy some self-documenting {ggplots} like this one: Just read on! I’ve been working hard on a package that I’ve called {chronicler} (read my post on it here) which allows you to attach a log to the objects you create, thus making it easy to know how some data (for example) has been created. Here’s a quick example and intro to the...

3673 sym R (3178 sym/15 pcs) 12 img

chronicler is now available on CRAN

17.05.2022

I am very happy to annouce that the {chronicler} package, which I’ve been working on for the past 3 months has been released on CRAN. Install it with: install.packages("chronicler") {chronicler} allows you to create objects that carry a log with them. Here is an example of an object that has been created using {chronicler}, and saved using save...

2698 sym R (1801 sym/5 pcs) 4 img

Get packages that introduce unique syntax adopted less?

20.05.2022

I have this hypothesis that packages that introduce a unique syntax, or a workflow change, get adopted less by users, even if what these packages do is super useful. I’m going to discuss two examples of packages that I think are really, really useful, but sometimes I wonder how many R users use them, or would use them if they were aware these p...

6651 sym R (1099 sym/9 pcs) 4 img

Get packages that introduce unique syntax adopted less?

20.05.2022

I have this hypothesis that packages that introduce a unique syntax, or a workflow change, get adopted less by users, even if what these packages do is super useful. I’m going to discuss two examples of packages that I think are really, really useful, but sometimes I wonder how many R users use them, or would use them if they were aware these p...

6651 sym R (1099 sym/9 pcs) 4 img

Some learnings from functional programming you can use to write safer programs

25.05.2022

Learning number 1: make functions fail early When writing your own functions, avoid conversion of types without warning. For example, this function only works on characters: my_nchar <- function(x, result = 0){ if(x == ""){ result } else { result <- result + 1 split_x <- strsplit(x, split = "")[[1]] my_nchar(paste0(split_x[-1...

5309 sym R (2342 sym/22 pcs) 2 img