RWhiteDwarf / blog

R with White Dwarf blog
0 stars 0 forks source link

post/comparison_dplyr_vs_base_r/ #6

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Efficiency comparison of dplyr and tidyr functions vs base R | R with White Dwarf

Monte carlo simulations to compare time efficiency of a function created with dplyr and tidyr vs base R

https://blog.rwhitedwarf.com/post/comparison_dplyr_vs_base_r/

couthcommander commented 1 year ago

Instead of full_join, try:

receiving[,setdiff(names(assay), names(receiving))] <- NA
responses <- rbind(assay, receiving, make.row.names = FALSE)
Dulani commented 1 year ago

Nice blog post! Prior to this, I was under the impression that Tidyverse was slower for the computer and faster for the coder. It has certainly made it much faster for my colleagues to read/understand my code and for me to quickly understand what was doing in my older (>6 months) code.

I wonder if using NA_character_ directly instead of as.character(NA) multiple times throughout the Tidyverse code would save a bit on the conversion?