Skip to content

Commit

Permalink
rmout
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavjack committed Jul 13, 2024
1 parent 1e8bc01 commit 01c51c7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions R/remove_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,15 @@ remove_outliers <- function(data
BHStud_test <- tibble(adjp = rawp.BHStud
, bholm = test.BHStud
) %>%
rownames_to_column("index") %>%
# rownames_to_column("index") %>%
mutate(out_flag = ifelse(bholm <0.05, "OUTLIER", "."))

outliers <- merge(newdt, BHStud_test) %>%

mrgdt <- cbind(newdt, BHStud_test)

outliers <- mrgdt %>%
dplyr::filter(out_flag %in% "OUTLIER")

cleandt <- merge(newdt, BHStud_test) %>%
cleandt <- mrgdt %>%
dplyr::mutate({{trait}} := case_when(
!out_flag %in% "OUTLIER" ~ as.character(.data[[trait]])
, TRUE ~ NA_character_
Expand Down

0 comments on commit 01c51c7

Please sign in to comment.