The tutorial you need to maximize your use of R's lists (CC276)

April 22, 2024 • PD Schloss • 1 min read

What is your preferred method for building a list in R? Do you know its performance characteristics relative to other methods and the size of the list? In this tutorial, Pat compares 12 methods of building lists and compares them to their parallel approach for generating vectors and shows how they compare to each other. He uses the microbenchmark package to evaluate their speed for different sized vectors. Rcpp, purrr, and the base and magrittr pipes will also make an appearance. You’ll likely be surprised by the results! This episode is part of an ongoing effort to develop an R package that implements the naive Bayesian classifier.


You can browse the state of the repository at the