Articles by Bruno Rodrigues

My free book has a cover!

January 6, 2017 | 0 Comments

I’m currently writing a book as a hobby. It’s titled Functional programming and unit testing for data munging with R and you can get it for free here. You can also read it online for free on my webpage What’s the book about? Here’s the teaser... [Read more...]

Merge a list of datasets together

July 29, 2016 | 0 Comments

Last week I showed how to read a lot of datasets at once with R, and this week I’ll continue from there and show a very simple function that uses this list of read datasets and merges them all together. First we’ll use read_list() to read all ... [Read more...]

Data frame columns as arguments to dplyr functions

July 17, 2016 | 0 Comments

Suppose that you would like to create a function which does a series of computations on a data frame. You would like to pass a column as this function’s argument. Something like: data(cars) convertToKmh % summarise(mean_speed = mean(speed)) -__ dataset return(dataset) } simpleFunction(cars, "dist") ## # A tibble: 35 ... [Read more...]

Careful with tryCatch

June 20, 2016 | 0 Comments

tryCatch is one of the functions that allows the users to handle errors in a simple way. With it, you can do things like: if(error), then(do this). Take the following example: sqrt("a") Error in sqrt("a") : non-numeric argument to mathematical function Now maybe you’d want something ... [Read more...]

Unit testing with R

March 30, 2016 | 0 Comments

I've been introduced to unit testing while working with colleagues on quite a big project for which we use Python. At first I was a bit skeptical about the need of writing unit tests, but now I must admit that I am seduced by the idea and by the huge ... [Read more...]

Update to Introduction to programming econometrics with R

May 2, 2015 | 0 Comments

This semester I taught a course on applied econometrics with the R programming language. For this, I created a document that I gave to my students and shared online. This is the kind of document I would have liked to read when I first started using R. I already had ... [Read more...]

Export R output to a file

February 21, 2015 | 0 Comments

Sometimes it is useful to export the output of a long-running R command. For example, you might want to run a time consuming regression just before leaving work on Friday night, but would like to get the output saved inside your Dropbox folder to take a look at the results ... [Read more...]

Introduction to programming econometrics with R

January 11, 2015 | 0 Comments

This semester, I’ll be teaching an introduction to applied econometrics with R, so I’ve decided to write a very small book called “Introduction to programming Econometrics with R”. This is primarily intended for bachelor students and the focus is not much on econometric theory, but more on how ... [Read more...]

Using R as a Computer Algebra System with Ryacas

December 31, 2013 | 0 Comments

R is used to perform statistical analysis and doesn't focus on symbolic maths. But it is sometimes useful to let the computer derive a function for you (and have the analytic expression of said derivative), but maybe you don't want to leave your comfy R shell. It is possible to ... [Read more...]

Nonlinear Gmm with R – Example with a logistic regression

November 7, 2013 | 0 Comments

In this post, I will explain how you can use the R gmm package to estimate a non-linear model, and more specifically a logit model. For my research, I have to estimate Euler equations using the Generalized Method of Moments. I contacted Pierre Chaussé, the creator of the gmm library ... [Read more...]

New website!

December 11, 2012 | 0 Comments

This is my new website! It’s built using jekyll-bootstrap and hosted on Github. [Read more...]

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)