Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/data-cleaning/validatesuggest

Generate validation rules from data
https://github.com/data-cleaning/validatesuggest

data-cleaning r validation

Last synced: 3 months ago
JSON representation

Generate validation rules from data

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# validatesuggest

[![CRAN status](https://www.r-pkg.org/badges/version/validatesuggest)](https://CRAN.R-project.org/package=validatesuggest)
[![R-CMD-check](https://github.com/data-cleaning/validatesuggest/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/data-cleaning/validatesuggest/actions/workflows/R-CMD-check.yaml)

The goal of validatesuggest is to generate suggestions for [validation](https://CRAN.R-project.org/package=validate) rules from a supplied
dataset. These can be used as a starting point for a rule set and are to be
adjusted by domain experts.

## Installation

And the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("data-cleaning/validatesuggest")
```
## Example

```{r example}
library(validate)
library(validatesuggest)

data(retailers, package="validate")
data(SBS2000, package="validate")

# does all
#suggest_rules(retailers)

suggest_pos_check(retailers)

suggest_range_check(retailers, min=TRUE, max=TRUE)

suggest_na_check(retailers)

suggest_unique_check(SBS2000)

suggest_type_check(retailers)

suggest_ratio_check(retailers)

write_cond_rule(car_owner)
```