Skip to content

Instantly share code, notes, and snippets.

@ercbk
ercbk / skim_arrow.R
Last active October 16, 2025 12:47
Lazily calculates summary statistics for an arrow dataset in R
#' Skim an Arrow Dataset
#'
#' Provides a `skimr`-style summary of an Arrow Dataset with statistics
#' organized by variable type. Computes summary statistics efficiently using
#' Arrow's query engine without loading the full dataset into memory.
#'
#' @param ds An Arrow Dataset object created with `arrow::open_dataset()`.
#'
#' @return A list of class "skim_arrow" containing:
#' \item{overview}{A tibble with dataset dimensions and column type counts}
@ercbk
ercbk / facet-zoom-table-annot.R
Created March 25, 2019 17:04
Add a table to a ggforce:facet_zoom with grid graphics
# Using grid and gridExtra to add a table annotation to a ggforce::facet_zoom
# Sources:
# 1. Tidy Tuesday github repo (board_games.csv). https://github.com/rfordatascience/tidytuesday
# 2. David Robinson's data-screencasts github repo (board-games.Rmd). https://github.com/dgrtwo/data-screencasts
# Further Reading:
# 1. R. Peng, S. Kross, and B. Anderson in: "Mastering Software Development in R", sect 4.5, https://bookdown.org/rdpeng/RProgDA/the-grid-package.html
# 2. B. Auguie, ftp://cran.r-project.org/pub/R/web/packages/gridExtra/vignettes/