Snakes, pandas, sea born creatures and how to find them

What’s the fastest way to read a csv file in R? Among the R packages, the ultra-fast sprinter is certainly data.table but…few years ago, the introduction of the package reticulate gave us the possibility of use python and in particular the library pandas to read files in R. Would pandas (used in R) be faster than data.table? How would its performance compare with readr or base R? Let’s take a look.

Do not invoke me

You know how to apply a function to a list of elements (apply, purrr:map) but… do you know how to apply a list of functions to the same data/arguments? In this short post we will answer that question.

Fighting Diseases with Predictive Modeling

In this post we will analyze the data of the ADD HEALTH, a national longitudinal study that enrolled ~90000 adolescents and followed them up for 20 years. Using the R package caret, we will train and evaluate different models (regression, decision tree, random Forest) in order to predict drug use behavior in adulthood from information (friends, social activities, parents and others) collected during adolescence. This will give us the opportunity to play and get familiarized with the most important caret functions as well as to introduce seminal concepts of machine learning.