A constructed data set useful for detecting conditinal dependencies.

car_owner

Format

A data frame with 200 rows and 4 variables. Each row is a person with:

age

age of person

driver_license

has a driver license, only persons older then 17 can have a license in this data set

income

monthly income

owns_car

only persons with a drivers license , and a monthly income > 1500 can own a car

car_color

NA when there is no car

Examples

data("car_owner")

rules <- suggest_cond_rule(car_owner)
rules$rules
#> [[1]]
#> 
#> Object of class rule.
#>  expr       : if (driver_license == FALSE) owns_car == FALSE 
#>  name       : CR1 
#>  label      :  
#>  description: conditional rule 
#>  origin     : validatesuggest 0.3.2 
#>  created    : 2023-10-06 10:29:38
#>  meta       : language<chr>, severity<chr>
#> [[2]]
#> 
#> Object of class rule.
#>  expr       : if (owns_car == TRUE) income > 0 
#>  name       : CR2 
#>  label      :  
#>  description: conditional rule 
#>  origin     : validatesuggest 0.3.2 
#>  created    : 2023-10-06 10:29:38
#>  meta       : language<chr>, severity<chr>