R/print.stratified.data.frame.R

Defines functions print.stratified.data.frame

Documented in print.stratified.data.frame

print.stratified.data.frame <- function(x,
                                        ...){

  object <- x
  
  cat("\n Stratified by: ", object$stratified.by,"\n")

  cat("\n Strata information: \n\n")

  df <-
    data.frame(cbind(object$intervals,
                     as.numeric(table(object$stratum.index)),
                     round(as.numeric(table(object$stratum.index))/dim(object$data)[1],3)))
  
  colnames(df) <- c("  Strata bounds","    n","    n (proportion)")


  print(df)

}

Try the nonrandom package in your browser

Any scripts or data that you put into this service are public.

nonrandom documentation built on May 29, 2017, 11:41 p.m.