R/print.sc_desc.R

Defines functions print.sc_desc

Documented in print.sc_desc

#' @rdname print.sc
#' @export
print.sc_desc <- function(x, digits = "auto", ...) {
  
  if (digits == "auto") digits <- 3
  
  cat("Describe Single-Case Data\n\n")
  x$descriptives[-1:-2] <- round(x$descriptives[-1:-2], digits)
  out <- as.data.frame(t(x$descriptives[-1]))
  colnames(out) <- x$descriptives$Case
  
  print(
    out[1:(2 * length(x$design) + 1), , drop = FALSE], 
    digits = digits, ...
  )
  cat("\n")
  print(
    out[-(1:(2 * length(x$design) + 1)), , drop = FALSE], 
    digits = digits, ...
  )
  .note_vars(x)
  
}
jazznbass/scan_develop documentation built on Sept. 9, 2024, 6:23 a.m.