{"id":14068487,"url":"https://github.com/tidymodels/rsample","last_synced_at":"2025-05-15T07:03:41.458Z","repository":{"id":37623067,"uuid":"89093570","full_name":"tidymodels/rsample","owner":"tidymodels","description":"Classes and functions to create and summarize resampling objects","archived":false,"fork":false,"pushed_at":"2025-04-23T20:35:00.000Z","size":28902,"stargazers_count":340,"open_issues_count":35,"forks_count":65,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-05-15T07:02:26.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rsample.tidymodels.org","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tidymodels.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-04-22T19:19:58.000Z","updated_at":"2025-04-23T20:31:50.000Z","dependencies_parsed_at":"2023-02-19T10:31:10.270Z","dependency_job_id":"fdfe12b5-86e4-4e84-9cde-2d9b46cd1ab6","html_url":"https://github.com/tidymodels/rsample","commit_stats":{"total_commits":589,"total_committers":39,"mean_commits":"15.102564102564102","dds":0.6044142614601018,"last_synced_commit":"be593b9e5502998832a0a939197bfc3a4b46738b"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Frsample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Frsample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Frsample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Frsample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidymodels","download_url":"https://codeload.github.com/tidymodels/rsample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254291961,"owners_count":22046424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-13T07:06:12.731Z","updated_at":"2025-05-15T07:03:41.447Z","avatar_url":"https://github.com/tidymodels.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\neditor_options: \n  chunk_output_type: console\n---\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# rsample \u003ca href='https://rsample.tidymodels.org/'\u003e\u003cimg src='man/figures/logo.png' align=\"right\" height=\"139\" alt=\"a boot on a green background\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/tidymodels/rsample/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidymodels/rsample/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/tidymodels/rsample/graph/badge.svg)](https://app.codecov.io/gh/tidymodels/rsample)\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/rsample)](https://cran.r-project.org/package=rsample)\n[![Downloads](https://cranlogs.r-pkg.org/badges/rsample)](https://cran.r-project.org/package=rsample)\n[![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html)\n\u003c!-- badges: end --\u003e\n\n\n## Overview\n\nThe rsample package provides functions to create different types of resamples and corresponding classes for their analysis. \nThe goal is to have a modular set of methods that can be used for:\n \n * resampling for estimating the sampling distribution of a statistic\n * estimating model performance using a holdout set\n \nThe scope of rsample is to provide the basic building blocks for creating and analyzing resamples of a data set, but this package does not include code for modeling or calculating statistics. The [Working with Resample Sets](https://rsample.tidymodels.org/articles/Working_with_rsets.html) vignette gives a demonstration of how rsample tools can be used when building models.  \n\nNote that resampled data sets created by rsample are directly accessible in a resampling object but do not contain much overhead in memory. Since the original data is not modified, R does not make an automatic copy. \n \nFor example, creating 50 bootstraps of a data set does not create an object that is 50-fold larger in memory:\n\n``` r\nlibrary(rsample)\nlibrary(mlbench)\n\ndata(LetterRecognition)\nlobstr::obj_size(LetterRecognition)\n#\u003e 2,644,640 B\n\nset.seed(35222)\nboots \u003c- bootstraps(LetterRecognition, times = 50)\nlobstr::obj_size(boots)\n#\u003e 6,686,776 B\n\n# Object size per resample\nlobstr::obj_size(boots)/nrow(boots)\n#\u003e 133,735.5 B\n\n# Fold increase is \u003c\u003c\u003c 50\nas.numeric(lobstr::obj_size(boots)/lobstr::obj_size(LetterRecognition))\n#\u003e [1] 2.528426\n```\n\n\u003csup\u003eCreated on 2022-02-28 by the [reprex package](https://reprex.tidyverse.org) (v2.0.1)\u003c/sup\u003e\n\nThe memory usage for 50 bootstrap samples is less than 3-fold more than the original data set. \n\n\n## Installation\n\nTo install it, use:\n\n```{r install, eval = FALSE}\ninstall.packages(\"rsample\")\n```\n\nAnd the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"pak\")\npak::pak(\"rsample\")\n```\n\n## Contributing\n\nThis project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n\n- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on Posit Community](https://forum.posit.co/new-topic?category_id=15\u0026tags=tidymodels,question).\n\n- If you think you have encountered a bug, please [submit an issue](https://github.com/tidymodels/rsample/issues).\n\n- Either way, learn how to create and share a [reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html) (a minimal, reproducible example), to clearly communicate about your code.\n\n- Check out further details on [contributing guidelines for tidymodels packages](https://www.tidymodels.org/contribute/) and [how to get help](https://www.tidymodels.org/help/).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidymodels%2Frsample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidymodels%2Frsample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidymodels%2Frsample/lists"}