Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Nov 27, 2023
1 parent 8b43ac2 commit db9aa8e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions R/data_tabulate.R
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ print.dw_data_tabulates <- function(x, big_mark = NULL, ...) {
}
} else {
x <- lapply(x, function(i) {
attr <- attributes(i)
i_attr <- attributes(i)
i <- format(i, format = "text", big_mark = big_mark, ...)
i$Variable[attr$duplicate_varnames] <- ""
if (!is.null(i$Group)) i$Group[attr$duplicate_varnames] <- ""
i$Variable[i_attr$duplicate_varnames] <- ""
if (!is.null(i$Group)) i$Group[i_attr$duplicate_varnames] <- ""
i[nrow(i) + 1, ] <- ""
i
})
Expand All @@ -375,9 +375,9 @@ print_html.dw_data_tabulates <- function(x, big_mark = NULL, ...) {
print_html(x[[1]], big_mark = big_mark, ...)
} else {
x <- lapply(x, function(i) {
attr <- attributes(i)
i_attr <- attributes(i)
i <- format(i, format = "html", big_mark = big_mark, ...)
i$Variable[attr$duplicate_varnames] <- ""
i$Variable[i_attr$duplicate_varnames] <- ""
i
})

Expand All @@ -401,10 +401,10 @@ print_md.dw_data_tabulates <- function(x, big_mark = NULL, ...) {
print_md(x[[1]], big_mark = big_mark, ...)
} else {
x <- lapply(x, function(i) {
attr <- attributes(i)
i_attr <- attributes(i)
i <- format(i, format = "markdown", big_mark = big_mark, ...)
i$Variable[attr$duplicate_varnames] <- ""
if (!is.null(i$Group)) i$Group[attr$duplicate_varnames] <- ""
i$Variable[i_attr$duplicate_varnames] <- ""
if (!is.null(i$Group)) i$Group[i_attr$duplicate_varnames] <- ""
i[nrow(i) + 1, ] <- ""
i
})
Expand Down

0 comments on commit db9aa8e

Please sign in to comment.