Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 11, 2023
1 parent 99a2993 commit 66e93af
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 208 deletions.
38 changes: 19 additions & 19 deletions R/format.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,16 @@ format.parameters_model <- function(x,
# to "split" the formatted table, because the glue-function needs the columns
# without the parameters-column.
if (!is.null(style)) {
if (!is.data.frame(formatted_table)) {
formatted_table[] <- lapply(
if (is.data.frame(formatted_table)) {
formatted_table <- .style_formatted_table(
formatted_table,
.style_formatted_table,
style = style,
format = format
)
} else {
formatted_table <- .style_formatted_table(
formatted_table[] <- lapply(
formatted_table,
.style_formatted_table,
style = style,
format = format
)
Expand Down Expand Up @@ -824,9 +824,9 @@ format.parameters_sem <- function(x,
}

string_tailed <- switch(ci_method,
"hdi" = "highest-density",
"uniroot" = ,
"profile" = "profile-likelihood",
hdi = "highest-density",
uniroot = ,
profile = "profile-likelihood",
"equal-tailed"
)

Expand All @@ -840,15 +840,15 @@ format.parameters_sem <- function(x,
}

string_method <- switch(ci_method,
"bci" = ,
"bcai" = "bias-corrected accelerated bootstrap",
"si" = ,
"ci" = ,
"quantile" = ,
"eti" = ,
"hdi" = sampling_method,
"normal" = "Wald normal",
"boot" = "parametric bootstrap",
bci = ,
bcai = "bias-corrected accelerated bootstrap",
si = ,
ci = ,
quantile = ,
eti = ,
hdi = sampling_method,
normal = "Wald normal",
boot = "parametric bootstrap",
"Wald"
)

Expand All @@ -860,9 +860,9 @@ format.parameters_sem <- function(x,

if (!is.null(test_statistic) && !ci_method == "normal" && !isTRUE(bootstrap)) {
string_statistic <- switch(tolower(test_statistic),
"t-statistic" = "t",
"chi-squared statistic" = ,
"z-statistic" = "z",
`t-statistic` = "t",
`chi-squared statistic` = ,
`z-statistic` = "z",
""
)
string_method <- paste0(string_method, " ", string_statistic, "-")
Expand Down
Loading

0 comments on commit 66e93af

Please sign in to comment.