Skip to content

Commit

Permalink
Styler
Browse files Browse the repository at this point in the history
  • Loading branch information
finnlindgren committed Nov 27, 2024
1 parent 5c5419b commit 3012661
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions R/effect.R
Original file line number Diff line number Diff line change
Expand Up @@ -1271,8 +1271,8 @@ make_submapper <- function(subcomp_n,
values <- make_values(subcomp_n, subcomp_values, input_values, label)

if (is.factor(values) ||
is.character(values) ||
(!is.null(subcomp_type) && (subcomp_type %in% "factor"))) {
is.character(values) ||
(!is.null(subcomp_type) && (subcomp_type %in% "factor"))) {
return(
bru_mapper_factor(
values,
Expand Down Expand Up @@ -1301,12 +1301,12 @@ make_submapper <- function(subcomp_n,
return(bru_mapper_linear())
}
if (require_indexed) {
return(
bru_mapper_factor(values,
factor_mapping = "full",
indexed = TRUE
)
return(
bru_mapper_factor(values,
factor_mapping = "full",
indexed = TRUE
)
)
}

return(bru_mapper_linear())
Expand Down Expand Up @@ -1461,7 +1461,7 @@ make_mapper <- function(subcomp,

# No mapper; construct based on input values
# Interpolation on by default
mapper<-
mapper <-
make_submapper(
subcomp_n = subcomp[["n"]],
subcomp_values = subcomp[["values"]],
Expand Down
8 changes: 4 additions & 4 deletions R/used.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ bru_used <- function(x = NULL, ...) {
#' vectors.
#' @export
bru_used.NULL <- function(x = NULL, ...,
effect = NULL,
effect_exclude = NULL,
latent = NULL,
labels = NULL) {
effect = NULL,
effect_exclude = NULL,
latent = NULL,
labels = NULL) {
used <- structure(
list(
effect = effect,
Expand Down

0 comments on commit 3012661

Please sign in to comment.