{"id":13705995,"url":"https://github.com/brodieG/vetr","last_synced_at":"2025-05-05T17:31:26.100Z","repository":{"id":24225782,"uuid":"27618103","full_name":"brodieG/vetr","owner":"brodieG","description":"Trust, but Verify","archived":false,"fork":false,"pushed_at":"2024-06-22T13:00:42.000Z","size":6937,"stargazers_count":80,"open_issues_count":39,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-01T13:17:18.724Z","etag":null,"topics":["argument-checks","input-validation","r"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brodieG.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-12-06T01:43:47.000Z","updated_at":"2025-04-16T02:12:44.000Z","dependencies_parsed_at":"2024-01-14T20:17:16.875Z","dependency_job_id":null,"html_url":"https://github.com/brodieG/vetr","commit_stats":{"total_commits":929,"total_committers":2,"mean_commits":464.5,"dds":"0.0010764262648008671","last_synced_commit":"0a9075de7cc6b835a05e5200f441cf60fe0036e3"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brodieG%2Fvetr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brodieG%2Fvetr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brodieG%2Fvetr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brodieG%2Fvetr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brodieG","download_url":"https://codeload.github.com/brodieG/vetr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252542252,"owners_count":21764934,"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":["argument-checks","input-validation","r"],"created_at":"2024-08-02T22:00:51.017Z","updated_at":"2025-05-05T17:31:25.658Z","avatar_url":"https://github.com/brodieG.png","language":"C","readme":"\u003c!-- README.md is generated from README.Rmd. Please edit that file \n\nlibrary(rmarkdown)\nrender('README.Rmd', output_format=html_vignette(css='vignettes/styles.css'))\nrmarkdown::render('README.Rmd', output_format=rmarkdown::md_document())\n\n--\u003e\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"##\",\n  fig.path = \"README-\",\n  error = TRUE\n)\nlibrary(vetr)\n```\n\n# vetr\n\n[![R build status](https://github.com/brodieG/vetr/workflows/R-CMD-check/badge.svg)](https://github.com/brodieG/vetr/actions)\n[![](https://codecov.io/github/brodieG/vetr/coverage.svg?branch=master)](https://app.codecov.io/gh/brodieG/vetr?branch=master)\n[![](http://www.r-pkg.org/badges/version/vetr)](https://cran.r-project.org/package=vetr)\n[![Project Status: WIP - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)\n[![Dependencies direct/recursive](https://tinyverse.netlify.app/badge/vetr)]( https://tinyverse.netlify.app/)\n\n```{r child='vignettes/rmdhunks/trust-but-verify.Rmd'}\n```\n\n```{r child='vignettes/rmdhunks/declarative-checks.Rmd'}\n```\n\n## Vetting Expressions\n\n```{r child='vignettes/rmdhunks/vetting-expressions.Rmd'}\n```\n\n## `vetr` in Functions\n\nIf you are vetting function inputs, you can use the `vetr` function, which works\njust like `vet` except that it is streamlined for use within functions:\n\n```{r}\nfun \u003c- function(x, y) {\n  vetr(numeric(1L), logical(1L))\n  TRUE   # do work...\n}\nfun(1:2, \"foo\")\nfun(1, \"foo\")\n```\n\n`vetr` automatically matches the vetting expressions to the corresponding\narguments and fetches the argument values from the function environment.\n\nSee [vignette][4] for additional details on how the `vetr` function works.\n\n## Additional Documentation\n\n* [`vetr` vignette][1], `?vet`, `?vetr`, `example(vet)`, `example(vetr)`.\n* [`alike` vignette][2], `?alike`, and `example(alike)` for discussion of\n  templates.\n* A survey of [parameter validation functions][5].\n\n## Development Status\n\n`vetr` is still in development, although most of the features are considered\nmature.  The most likely area of change is the treatment of function and\nlanguage templates (e.g.  `alike(sum, max)`), and more flexible treatment of\nlist templates (e.g. in future lists may be allowed to be different lengths so\nlong as every named element in the template exists in the object).\n\n## Installation\n\nThis package is available on CRAN:\n\n```{r eval=FALSE}\ninstall.packages('vetr')\n```\n\nIt has no runtime dependencies.\n\nFor the development version use\n`remotes::install_github('brodieg/vetr@development')` or:\n\n```{r eval=FALSE}\nf.dl \u003c- tempfile()\nf.uz \u003c- tempfile()\ngithub.url \u003c- 'https://github.com/brodieG/vetr/archive/development.zip'\ndownload.file(github.url, f.dl)\nunzip(f.dl, exdir=f.uz)\ninstall.packages(file.path(f.uz, 'vetr-development'), repos=NULL, type='source')\nunlink(c(f.dl, f.uz))\n```\n\nThe master branch typically mirrors CRAN and should be stable.\n\n## Alternatives\n\nThere are many alternatives available to `vetr`.  We do a survey of the\nfollowing in our [parameter validation functions][5] review:\n\n```{r child='vignettes/rmdhunks/related-packages.Rmd'}\n```\n\n## Acknowledgments\n\nThank you to:\n\n* R Core for developing and maintaining such a wonderful language.\n* CRAN maintainers, for patiently shepherding packages onto CRAN and maintaining\n  the repository, and Uwe Ligges in particular for maintaining\n  [Winbuilder](https://win-builder.r-project.org/).\n* Users and others who have reported bugs and/or helped contribute fixes (see\n  NEWS.md).\n* Tomas Kalibera for [rchk](https://github.com/kalibera/rchk) and rcnst to help\n  detect errors in compiled code, and in particular for his infinite patience in\n  helping me resolve the issues he identified for me.\n* [Jim Hester](https://github.com/jimhester) because\n  [covr](https://cran.r-project.org/package=covr) rocks.\n* [Dirk Eddelbuettel](https://github.com/eddelbuettel) and [Carl\n  Boettiger](https://github.com/cboettig) for the\n  [rocker](https://github.com/rocker-org/rocker) project, and [Gábor\n  Csárdi](https://github.com/gaborcsardi) and the\n  [R-consortium](https://www.r-consortium.org/) for\n  [Rhub](https://github.com/r-hub), without which testing bugs on R-devel and\n  other platforms would be a nightmare.\n* [Winston Chang](https://github.com/wch) for the\n  [r-debug](https://hub.docker.com/r/wch1/r-debug/) docker container, in\n  particular because of the valgrind level 2 instrumented version of R.\n* [Hadley Wickham](https://github.com/hadley/) and [Peter\n  Danenberg](https://github.com/klutometis) for\n  [roxygen2](https://cran.r-project.org/package=roxygen2).\n* [Yihui Xie](https://github.com/yihui) for\n  [knitr](https://cran.r-project.org/package=knitr) and  [J.J.\n  Allaire](https://github.com/jjallaire) etal for\n  [rmarkdown](https://cran.r-project.org/package=rmarkdown), and by extension\n  John MacFarlane for [pandoc](https://pandoc.org/).\n* [Michel Lang](https://github.com/mllg) for pushing me to implement `all_bw` to\n  compete with his own package [`checkmate`](https://cran.r-project.org/package=checkmate).\n* [Eugene Ha](https://github.com/egnha) for pointing me to several other\n  relevant packages, which in turn led to the [survey of related packages][5].\n* Stefan M. Bache for the idea of having a function for testing objects directly\n  (originally `vetr` only worked with function arguments), which I took from\n  ensurer.\n* Olaf Mersmann for\n  [microbenchmark](https://cran.r-project.org/package=microbenchmark), because\n  microsecond matter, and [Joshua Ulrich](https://github.com/joshuaulrich) for\n  making it lightweight.\n* All open source developers out there that make their work freely available\n  for others to use.\n* [Github](https://github.com/), [Codecov](https://about.codecov.io/),\n  [Vagrant](https://www.vagrantup.com/), [Docker](https://www.docker.com/),\n  [Ubuntu](https://ubuntu.com/), [Brew](https://brew.sh/) for providing\n  infrastructure that greatly simplifies open source development.\n* [Free Software Foundation](https://www.fsf.org/) for developing the GPL\n  license and promotion of the free software movement.\n\n## About the Author\n\nBrodie Gaslam is a hobbyist programmer based on the US East Coast.\n\n[1]: https://cran.r-project.org/package=vetr/vignettes/vetr.html\n[2]: https://cran.r-project.org/package=vetr/vignettes/alike.html\n[3]: https://cran.r-project.org/package=vetr/vignettes/vetr.html#non-standard-evaluation\n[4]: https://cran.r-project.org/package=vetr/vignettes/vetr.html#in-functions\n[5]: http://htmlpreview.github.io/?https://github.com/brodieG/vetr/blob/master/extra/compare.html\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FbrodieG%2Fvetr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FbrodieG%2Fvetr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FbrodieG%2Fvetr/lists"}