From c11caea273dc4e867c18c2101caf8f0a3dd2ead2 Mon Sep 17 00:00:00 2001 From: elong0527 Date: Tue, 24 Oct 2023 21:33:26 +0000 Subject: [PATCH] Style code (GHA) --- R/meta_validate.R | 4 ++-- tests/testthat/test-meta_validate.R | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/R/meta_validate.R b/R/meta_validate.R index dc35140..6b137f7 100644 --- a/R/meta_validate.R +++ b/R/meta_validate.R @@ -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") } } diff --git a/tests/testthat/test-meta_validate.R b/tests/testthat/test-meta_validate.R index a8313fb..3304361 100644 --- a/tests/testthat/test-meta_validate.R +++ b/tests/testthat/test-meta_validate.R @@ -1,4 +1,3 @@ - test_that("Check data_type", { meta <- meta_example() meta$data_population <- NULL