Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Melkiades committed Jul 22, 2024
1 parent ec842fc commit d9a99ed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 6 additions & 2 deletions R/utils_dim_control_and_checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
#' (`add_specific_value`) and rows (`keep_spec_rows`). Exploratory plots can be also appreciated with
#' `explorative = TRUE`.
#'
#' @return A modified `data.frame` and a plot if `exporative = TRUE`.
#' @return A modified `data.frame` and a plot if `explorative = TRUE`. If not interactive and `explorative = TRUE`,
#' a plot object is returned.
#'
#' @examples
#' # real case scenario: trimming of variables with too many levels
Expand Down Expand Up @@ -208,7 +209,10 @@ reduce_num_levels_in_df <- function(dt,
mutate(!!sym(variable) := factor(!!sym(variable)))

if (explorative) {
return(gg)
if (!interactive()) { # for testing
return(gg)
}
print(gg)
}
invisible(out)
}
Expand Down
3 changes: 2 additions & 1 deletion man/reduce_num_levels_in_df.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions vignettes/data_pre_processing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ library(random.cdisc.data)
data("cadae")
```

```{r}
# desc_ae <- Hmisc::describe(cadae)
# desc_ae$SEX
```

## Reducing number of levels per variable

Expand Down

0 comments on commit d9a99ed

Please sign in to comment.