Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%in% being changed to %vin% #25

Open
gunnaringle opened this issue Dec 1, 2023 · 1 comment
Open

%in% being changed to %vin% #25

gunnaringle opened this issue Dec 1, 2023 · 1 comment

Comments

@gunnaringle
Copy link

When reading in a rule with %in% it sometimes changes the %in% into %vin%.
It has worked for a while but suddenly this error is arising.

Example
library(dcmodify)

dat <- data.frame(A = c(1,2,3),
B = c(3,3,3),
C = c(NA,NA,NA))

rules <- data.frame(rule = "if(A %in% c(2,4,50))C = 4")

r <- modifier(.data = rules)

print(r$assignments())
$M1
C = 4
attr(,"guard")
A %vin% c(2, 4, 50)

@markvanderloo
Copy link
Member

The %in% operator is replaced with %vin% for more consistent handling of NA's.

Perhaps I misunderstand you but you seem to report an error, but I don't see an error message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants