{"id":13400930,"url":"https://github.com/tidymodels/hardhat","last_synced_at":"2026-04-07T10:03:32.158Z","repository":{"id":37270605,"uuid":"170162478","full_name":"tidymodels/hardhat","owner":"tidymodels","description":"Construct Modeling Packages","archived":false,"fork":false,"pushed_at":"2025-11-23T16:43:37.000Z","size":14750,"stargazers_count":108,"open_issues_count":6,"forks_count":21,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-02-05T11:52:31.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hardhat.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-02-11T16:31:00.000Z","updated_at":"2025-11-23T16:41:12.000Z","dependencies_parsed_at":"2024-01-18T11:03:53.442Z","dependency_job_id":"997c184f-df1e-4be7-9158-83d442d67a72","html_url":"https://github.com/tidymodels/hardhat","commit_stats":{"total_commits":687,"total_committers":10,"mean_commits":68.7,"dds":0.1804949053857351,"last_synced_commit":"6d975576353f94915ce33acbf691645a467e1ec9"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/tidymodels/hardhat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Fhardhat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Fhardhat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Fhardhat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Fhardhat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidymodels","download_url":"https://codeload.github.com/tidymodels/hardhat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Fhardhat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31508282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-07-30T19:00:57.000Z","updated_at":"2026-04-07T10:03:32.152Z","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\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\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\noptions(rlang__backtrace_on_error = \"reminder\")\n```\n\n# hardhat \u003ca href=\"https://hardhat.tidymodels.org\"\u003e\u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"138\"/\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n\n[![Codecov test coverage](https://codecov.io/gh/tidymodels/hardhat/graph/badge.svg)](https://app.codecov.io/gh/tidymodels/hardhat)\n[![R-CMD-check](https://github.com/tidymodels/hardhat/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidymodels/hardhat/actions/workflows/R-CMD-check.yaml)\n[![R-CMD-check-hard](https://github.com/tidymodels/hardhat/actions/workflows/R-CMD-check-hard.yaml/badge.svg)](https://github.com/tidymodels/hardhat/actions/workflows/R-CMD-check-hard.yaml)\n\u003c!-- badges: end --\u003e\n\n## Introduction\n\nhardhat is a *developer focused* package designed to ease the creation of new modeling packages, while simultaneously promoting good R modeling package standards as laid out by the set of opinionated [Conventions for R Modeling Packages](https://tidymodels.github.io/model-implementation-principles/).\n\nhardhat has four main goals:\n\n-   Easily, consistently, and robustly preprocess data at fit time and prediction time with `mold()` and `forge()`.\n\n-   Provide one source of truth for common input validation functions, such as checking if new data at prediction time contains the same required columns used at fit time.\n\n-   Provide extra utility functions for additional common tasks, such as adding intercept columns, standardizing `predict()` output, and extracting valuable class and factor level information from the predictors.\n\n-   Reimagine the base R preprocessing infrastructure of `stats::model.matrix()` and `stats::model.frame()` using the stricter approaches found in `model_matrix()` and `model_frame()`.\n\nThe idea is to reduce the burden of creating a good modeling interface as much as possible, and instead let the package developer focus on writing the core implementation of their new model.\nThis benefits not only the developer, but also the user of the modeling package, as the standardization allows users to build a set of \"expectations\" around what any modeling function should return, and how they should interact with it.\n\n## Installation\n\nYou can install the released version of hardhat from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"hardhat\")\n```\n\nAnd the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"pak\")\npak::pak(\"tidymodels/hardhat\")\n```\n\n## Learning more\n\nTo learn about how to use hardhat, check out the vignettes:\n\n-   `vignette(\"mold\", \"hardhat\")`: Learn how to preprocess data at fit time with `mold()`.\n\n-   `vignette(\"forge\", \"hardhat\")`: Learn how to preprocess new data at prediction time with `forge()`.\n\n-   `vignette(\"package\", \"hardhat\")`: Learn how to use `mold()` and `forge()` to help in creating a new modeling package.\n\nYou can also watch [Max Kuhn](https://github.com/topepo) discuss how to use hardhat to build a new modeling package from scratch at the XI Jornadas de Usuarios de R conference [here](https://canal.uned.es/video/5dd25b9f5578f275e407dd88).\n\n[![](https://i.imgur.com/XKIZfWd.png)](https://canal.uned.es/video/5dd25b9f5578f275e407dd88)\n\n## Contributing\n\nThis project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).\nBy 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 RStudio 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/hardhat/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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidymodels%2Fhardhat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidymodels%2Fhardhat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidymodels%2Fhardhat/lists"}