Skip to content

Commit

Permalink
oups
Browse files Browse the repository at this point in the history
  • Loading branch information
larmarange committed Mar 26, 2024
1 parent 648f52b commit be2d4da
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/gglikert.R
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,6 @@ gglikert_data <- function(data,
arg_name = "include"
)

factor_to_sort <- broom.helpers::.select_to_varnames(
select = {{ factor_to_sort }},
data = data,
arg_name = "factor_to_sort",
select_single = TRUE
)

weights_var <- broom.helpers::.select_to_varnames(
select = {{ weights }},
data = data,
Expand Down Expand Up @@ -427,6 +420,13 @@ gglikert_data <- function(data,
data$.question <- data_labels[data$.question] %>%
forcats::fct_inorder()

factor_to_sort <- broom.helpers::.select_to_varnames(
select = {{ factor_to_sort }},
data = data,
arg_name = "factor_to_sort",
select_single = TRUE
)

if (sort == "ascending" && sort_method == "prop") {
data[[factor_to_sort]] <- data[[factor_to_sort]] %>%
forcats::fct_reorder2(
Expand Down

0 comments on commit be2d4da

Please sign in to comment.