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

Check factor #152

Merged
merged 5 commits into from
Oct 24, 2023
Merged

Check factor #152

merged 5 commits into from
Oct 24, 2023

Conversation

elong0527
Copy link
Collaborator

enable checking described in #151

@elong0527 elong0527 merged commit a2fbab2 into main Oct 24, 2023
# Snapshot testing
ae_summary <- function(meta, population, observation, parameter) {
message("run ae_summary")
return(NULL)
Copy link
Collaborator

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)) {
Copy link
Collaborator

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)) {
Copy link
Collaborator

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)))

@nanxstats nanxstats deleted the check-factor branch October 24, 2023 23:14
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

Successfully merging this pull request may close these issues.

3 participants