Growing List vs Growing Queue
### GROWING LIST ### base_lst1 <- function(df) { l <- list() for (i in seq(nrow(df))) l[[i]] <- as.list(df[i, ]) return(l) } ### PRE-ALLOCATING LIST ### base_lst2 <- function(df) { l...continue reading.
### GROWING LIST ### base_lst1 <- function(df) { l <- list() for (i in seq(nrow(df))) l[[i]] <- as.list(df[i, ]) return(l) } ### PRE-ALLOCATING LIST ### base_lst2 <- function(df) { l...continue reading.
In R, there are a couple ways to convert the column-oriented data frame to a row-oriented dictionary list or alike, e.g. a list of lists. In the code snippet below,...continue reading.
by Angelika Stefan & Felix Schönbrodt Almost all researchers have experienced the tingling feeling of suspense that arises right before they take a look at long-awaited data: Will they support...continue reading.
Someone desperately seeking solutions to the even numbered questions of Introducing Monte Carlo Methods with R…. How odd!continue reading.
So you have read my (draft) book on evidence-based software engineering and want to learn more about the statistical techniques used, but are not interested lots of detailed mathematics. What...continue reading.
Introduction I’ve spent the past few weeks writing about MCHT, my new package for Monte Carlo and bootstrap hypothesis testing. After discussing how to use MCHT safely, I discussed how...continue reading.
Multiple comparisons of group-level means is a tricky problem in statistical inference. A standard practice is to adjust the threshold for statistical significance according to the number of pairwise tests...continue reading.
Abstract: As an applied statistician you get in touch with many challenging problems in need of a statistical solution. Often, your client/colleague already has a working solution and just wants...continue reading.
Anscombe’s Quartet is a famous collection of four small data sets — just 11 (x,y) pairs each — that was developed in the 1970s to emphasize the fact that sometimes,...continue reading.
One of the differences between statistical data scientists and machine learning engineers is that while the latter group are concerned primarily with the predictive performance of a model, the former...continue reading.
For those of us who received statistical training outside of statistics departments, it often emphasized procedures over principles. This entailed that we learned about various statistical techniques and how to...continue reading.
¡Ay que ver cómo se estropean los cuerpos! (Pilar, my beloved grandmother) My grandmother was a master of sewing. When she was young, she worked as dressmaker, and her profession...continue reading.
In previous posts (https://statcompute.wordpress.com/2017/01/22/monotonic-binning-with-smbinning-package) and (https://statcompute.wordpress.com/2017/06/15/finer-monotonic-binning-based-on-isotonic-regression), I’ve developed 2 different algorithms for monotonic binning. While the first tends to generate bins with equal densities, the second would define finer bins...continue reading.
R has been around long time and the packages have evolved through the years as well. From the initial releases, updates, to new packages. Like many open-source and community driven...continue reading.
Naive Bayes classifiers are simple but powerful tools for classification in statistics and machine learning. In this video tutorial, I use a simulated data set and illustrate the mathematical details...continue reading.
It has been just a few months since I reviewed five free and open-source point-and-click graphical user interfaces (GUIs) to the R language. I plan to keep those reviews up...continue reading.
I am so grateful to Mandy Gu for being a guest on The Central Equilibrium to talk about word embeddings and text classification. She began by showing how data from...continue reading.
This blog post is one of a series highlighting specific images from my book Data Visualization: charts, maps and interactive … Morecontinue reading.
How to apply a function to a matrix/tibblecontinue reading.
A reader, e.g. Mr. Wayne Zhang, of my previous post (https://statcompute.wordpress.com/2018/09/03/playing-map-and-reduce-in-r-by-group-calculation) made a good comment that “Why not use directly either Spark or H2O to derive such computations without involving...continue reading.