small error in freq

This commit is contained in:
dr. M.S. (Matthijs) Berends 2018-11-19 13:06:07 +01:00
parent a8132922af
commit 63ba4b2980
1 changed files with 3 additions and 4 deletions

View File

@ -679,11 +679,10 @@ print.frequency_tbl <- function(x, nmax = getOption("max.print.freq", default =
footer <- NULL
}
if (any(class(x$item) %in% c('double', 'integer', 'numeric', 'raw', 'single'))) {
x$item <- format(x$item)
}
if ("item" %in% colnames(x)) {
x$item <- format(x$item)
if (any(class(x$item) %in% c('double', 'integer', 'numeric', 'raw', 'single'))) {
x$item <- format(x$item)
}
} else {
opt$column_names <- opt$column_names[!opt$column_names == "Item"]
}