Software
rsample

rsample

Classes and functions to create and summarize resampling objects

R

rsample provides functions to create different types of resamples (like bootstraps, cross-validation folds, and train/test splits) for R data analysis. It’s designed as a modular toolset for generating resampled datasets to estimate sampling distributions or evaluate model performance using holdout sets.

The package uses a memory-efficient approach where resampled datasets don’t duplicate the original data in memory—creating 50 bootstrap samples uses only about 2.5 times the memory of the original dataset rather than 50 times. rsample focuses specifically on creating and managing resamples rather than modeling or statistics calculation, making it a foundational building block that integrates with other tidymodels packages. It’s part of the tidymodels ecosystem for machine learning workflows in R.

Contributors