Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 23, 2023
1 parent 80d725f commit a61c2ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions R/export_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ print.insight_table <- function(x, ...) {
}

# Transform table matrix into a string value that can be printed
rows <- .table_parts(c(), final, header, sep, cross, empty_line)
rows <- .table_parts(NULL, final, header, sep, cross, empty_line)

# if we have over-lengthy tables that are split into two parts,
# print second table here
Expand All @@ -622,13 +622,13 @@ print.insight_table <- function(x, ...) {
if (length(caption) == 2 && .is_valid_colour(caption[2])) {
caption <- .colour(caption[2], caption[1])
}
if (!is.null(subtitle)) {
if (is.null(subtitle)) {
subtitle <- ""
} else {
# if we have a colour value, make coloured ansi-string
if (length(subtitle) == 2 && .is_valid_colour(subtitle[2])) {
subtitle <- .colour(subtitle[2], subtitle[1])
}
} else {
subtitle <- ""
}

# paste everything together and remove unnecessary double spaces
Expand Down
4 changes: 2 additions & 2 deletions R/format_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,10 @@ format_table <- function(x,
.format_p_values <- function(x, p_digits, stars = FALSE) {
# Specify stars for which column (#656)
if (is.character(stars)) {
starlist <- list("p" = FALSE)
starlist <- list(p = FALSE)
starlist[stars] <- TRUE
} else {
starlist <- list("p" = stars)
starlist <- list(p = stars)
}

for (pv in c("p", "p.value", "SGPV")) {
Expand Down

0 comments on commit a61c2ec

Please sign in to comment.