Skip to content

Commit

Permalink
fix: column name
Browse files Browse the repository at this point in the history
  • Loading branch information
aravindhebbali committed Mar 2, 2024
1 parent 295f7df commit d478871
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 @@ -378,7 +378,7 @@ print_ftable2 <- 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$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$varname), width = w, justify = "centre"), "\n")
cat(rep("-", w), sep = "")
Expand All @@ -393,9 +393,9 @@ print_ftable2 <- 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 d478871

Please sign in to comment.