-
Notifications
You must be signed in to change notification settings - Fork 6
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
Check factor #152
Check factor #152
Conversation
# Snapshot testing | ||
ae_summary <- function(meta, population, observation, parameter) { | ||
message("run ae_summary") | ||
return(NULL) |
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.
Do you mean invisible(NULL)
?
key_obs <- u_plan[i, "observation"] | ||
level_pop <- levels(meta$data_population[[metalite::collect_adam_mapping(meta, key_pop)$group]]) | ||
level_obs <- levels(meta$data_observation[[metalite::collect_adam_mapping(meta, key_obs)$group]]) | ||
if (!all(level_pop == level_obs)) { |
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.
Is it possible the level values are the same but the orders are different? Meaning a set comparison instead of a exact match comparison. Or are they already sorted?
@@ -86,5 +88,17 @@ meta_validate <- function(meta) { | |||
} | |||
}) | |||
|
|||
# check group factor level are the same | |||
u_plan <- unique(meta$plan[, c("population", "observation")]) | |||
for (i in 1:nrow(u_plan)) { |
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.
for (i in seq_len(nrow(u_plan)))
enable checking described in #151