Discovering Hidden Gems: Great R Libraries You Might Have Missed
R, the language of choice for statistics, data analysis, and visualization, has a rich ecosystem of packages. While some, like ggplot2, dplyr, and shiny, are widely known, many excellent packages fly under the radar, waiting to be discovered by data enthusiasts. Today, we're going to uncover some of these hidden gems in the R landscape, each capable of making your data science workflow more efficient, your analyses more robust, and your visualizations more compelling.
1. janitor
Data cleaning is an essential part of any data analysis process, and janitor is the unsung hero in this realm. With functions like clean_names() to standardize variable names and tabyl() for quick frequency tables, janitor helps you start your analysis on the right foot.
install.packages("janitor")
library(janitor)
# Example use:
df <- df %>% clean_names()2. patchwork
ggplot2 is the go-to for data visualization in R. If you've ever wanted to combine multiple ggplots into one figure, patchwork is the package for you. It allows for the easy arrangement of ggplot2 objects and doesn't require extensive knowledge of grid layouts.
install.packages("patchwork")
library(patchwork)
# Example use:
p1 <- ggplot(data1, aes(x, y)) + geom_point()
p2 <- ggplot(data2, aes(x, y)) + geom_line()
p1 + p23. DataExplorer
DataExplorer automates the initial data exploration process. This package accelerates getting to know your dataset, from generating automatic histograms and diagnosing missing values to plotting correlation matrices.
install.packages("DataExplorer")
library(DataExplorer)
# Example use:
plot_missing(data)4. gt
When it comes to creating beautiful tables in R, gt is a powerful package that can transform your data frames into stunning formats that can be integrated into reports or web apps.
install.packages("gt")
library(gt)
# Example use:
gt_table <- gt(data)5. furrr
Everyone knows purrr for functional programming in R, but have you met furrr? It extends the abilities of purrr by allowing you to easily harness the power of parallel computing, significantly speeding up your data processing.
install.packages("furrr")
library(furrr)
# Example use:
plan(multiprocess) # Execute in parallel
future_map(data, ~some_function(.x))6. conflicted
Name conflicts are a common annoyance in R, especially when using multiple packages with overlapping function names. conflicted Takes a straightforward approach to resolving these issues by making you explicitly choose which function to use.
install.packages("conflicted")
library(conflicted)
# Example use:
conflict_prefer("filter", "dplyr")7. skimr
For a detailed and comprehensible summary of your dataset beyond the primary summary function, there's skimr. It provides a frictionless way to get a thorough overview of your data structures, complete with histograms and data types.
install.packages("skimr")
library(skimr)
# Example use:
skim(data)This is just a sampling of the many underappreciated packages available to R users. Exploring these packages can significantly expand your R toolkit and inspire an inventive approach to data analysis challenges.






