-
Notifications
You must be signed in to change notification settings - Fork 4
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
Upload_values_fix #48
Conversation
vary_na = !missing_cases(get(y.var))) | ||
|
||
varx_na = !missing_cases(mget(x.var)), | ||
vary_na = !missing_cases(mget(y.var))) | ||
|
||
# let `use_util_reportvar` reflect updates | ||
# FALSE => is NA and not 2, 4 => NA updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@randrescastaneda , here we replace NAs in x with values in y. This should not happen in update_values()
only in update_NAs()
tests/testthat/test-update_values.R
Outdated
|
||
# Updating values in x2$x with values from y2$x | ||
res <- update_values(dt, | ||
var = "x", | ||
reportvar = ".joyn") | ||
# check not updated values | ||
which(is.na(res$x.x) & res$.joyn != 2) |> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No values in x should be updated here for dt. Because every row in x either has an NA or the corresponding row in y has an NA.
This PR contains the following:
update_values()
andupdates_NAs()
where they were not updating multiple variables.