You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Mark, I am in the situation that I want to check for many columns if they contain only the values from their respective codelists. From what I know, there is no shortcut fro writing these kinds of rules, since the use of more than one var_group() results in the cartesian product of these groups.
So what I would find helpful is the following:
I have a list of variables and
a list of codelists of the same length.
Within the definition of a validation rule, I would like to use something like (pseudo-code):
So this should map over both var and codelist and thus create only three validation rules when fed into validator().
To make this even more clear, maybe have a look at how map() is used as a transformation within the {drake} package: https://books.ropensci.org/drake/static.html#map
This deviates from the pseudo-code above but might be a better way to actually implement this? (I have no idea)
What are your thoughts on this?
The text was updated successfully, but these errors were encountered:
Hi Mark, I am in the situation that I want to check for many columns if they contain only the values from their respective codelists. From what I know, there is no shortcut fro writing these kinds of rules, since the use of more than one
var_group()
results in the cartesian product of these groups.So what I would find helpful is the following:
Within the definition of a validation rule, I would like to use something like (pseudo-code):
So this should map over both
var
andcodelist
and thus create only three validation rules when fed intovalidator()
.To make this even more clear, maybe have a look at how
map()
is used as a transformation within the {drake} package: https://books.ropensci.org/drake/static.html#mapThis deviates from the pseudo-code above but might be a better way to actually implement this? (I have no idea)
What are your thoughts on this?
The text was updated successfully, but these errors were encountered: