Skip to content

Commit

Permalink
Merge branch 'main' into strengejacke/issue887
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke authored Sep 11, 2023
2 parents a16d49f + 66e93af commit 698eafa
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 @@ -831,9 +831,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 @@ -847,15 +847,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 @@ -867,9 +867,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 698eafa

Please sign in to comment.