data-cleaning / validate

Professional data validation for the R environment
406 stars 39 forks source link

Creating rule names when rules are defined in .csv or .R files #152

Closed bzlato closed 3 years ago

bzlato commented 3 years ago

Hello again :) I see that the nice syntax for rule naming that works below doesn't work when trying to import rules from a .csv or .R rules <- validator(positive_speed = speed >= 0, ratio = speed/dist <= 1.5)

Is there a cleaner way to define names? Right now I am adding them with names() after importing with validator().

Thank you

markvanderloo commented 3 years ago

In csv files you can use a name column. For .R files there is currently no option although we are considering a roxygen2-alike syntax