Skip to content

Commit

Permalink
fix: closes #123
Browse files Browse the repository at this point in the history
  • Loading branch information
aravindhebbali committed Feb 28, 2024
1 parent 135f40d commit 16e26ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/ds-output.R
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ print_ftable <- function(x) {
nc <- ncol(x$ftable)
w1 <- max(nchar("Levels"), nchar(x$ftable$Levels), nchar("Missing"))
w2 <- max(nchar("Frequency"), nchar(x$ftable$Frequency), nchar(x$utility$na_count))
w3 <- max(nchar("Cum Frequency"), nchar(x$ftable$`Cum Frequency`))
w3 <- max(nchar("Cum Frequency"), nchar(x$ftable$Cum.Frequency))
w <- sum(w1, w2, w3, 26, 16)
cat(format(paste("Variable:", x$utility$varname), width = w, justify = "centre"), "\n")
cat(rep("-", w), sep = "")
Expand All @@ -343,9 +343,9 @@ print_ftable <- function(x) {
cat("\n")
cat(format(as.character(x$ftable$Levels[i]), width = w1, justify = "centre"), fs(),
format(as.character(x$ftable$Frequency[i]), width = w2, justify = "centre"), fs(),
format(as.character(x$ftable$`Cum Frequency`[i]), width = w3, justify = "centre"), fs(),
format(as.character(x$ftable$Cum.Frequency[i]), width = w3, justify = "centre"), fs(),
format(as.character(x$ftable$Percent[i]), width = 13, justify = "centre"), fs(),
format(as.character(x$ftable$`Cum Percent`[i]), width = 13, justify = "centre")
format(as.character(x$ftable$Cum.Percent[i]), width = 13, justify = "centre")
)
cat("\n")
cat(rep("-", w), sep = "")
Expand Down

0 comments on commit 16e26ed

Please # to comment.