Skip to content

Commit

Permalink
Style code (GHA)
Browse files Browse the repository at this point in the history
  • Loading branch information
elong0527 committed Oct 24, 2023
1 parent 393084c commit c11caea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/meta_validate.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ 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)){
for (i in 1:nrow(u_plan)) {
key_pop <- u_plan[i, "population"]
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)){
if (!all(level_pop == level_obs)) {
stop("Inconsistent group level: the levels of group variable from population and observation datasets are not the same")
}
}
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-meta_validate.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

test_that("Check data_type", {
meta <- meta_example()
meta$data_population <- NULL
Expand Down

0 comments on commit c11caea

Please sign in to comment.