Articles by R | TypeThePipe

Reordering bars in GGanimate visualization

December 15, 2019 | R | TypeThePipe

Last week several gganimate visualizations came to my feed. Some R users were wondering about reordering gganimate and ggplot2 bars as long as them are evolving (over animation time). Then, we came up with this R viz where several bars are not only evolving and reordering over time but leaving ... [Read more...]

Conditional Pipes

November 1, 2019 | R | TypeThePipe

How could we apply certain functions conditionally without leaving the pipeflow? This way: df %__% { if(apply_filter == TRUE) filter(., condition) else . } %__% ... [Read more...]

Counting NAs by column in R

October 1, 2019 | R | TypeThePipe

Are you starting your data exploration? Do you want to have an easy overview of your variable NA percentage? We create a function to benchmark different ways of achieving it: library(microbenchmark) library(tidyverse) benchmark_count_na_by_column % summary(), # Numeric output colSums(is.na(dataset)), sapply(dataset, function(x) ... [Read more...]
1 2

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)