The summary method for a tableby object
## S3 method for class 'tableby' summary( object, ..., labelTranslations = NULL, text = FALSE, title = NULL, pfootnote = FALSE, term.name = "" ) ## S3 method for class 'summary.tableby' as.data.frame( x, ..., text = x$text, pfootnote = x$pfootnote, term.name = x$term.name, width = NULL, min.split = NULL, list.ok = FALSE )
object |
An object of class |
... |
For |
labelTranslations |
A named list (or vector) where the name is the label in the
output to be replaced in the pretty rendering by the character string
value for the named element of the list, e.g., |
text |
An argument denoting how to print the summary to the screen.
Default is |
title |
Title/caption for the table, defaulting to |
pfootnote |
Logical, denoting whether to put footnotes describing the tests used to generate the p-values. Alternatively,
"html" to surround the outputted footnotes with |
term.name |
A character vector denoting the column name for the "terms" column. It should be the same length
as the number of tables or less (it will get recycled if needed). The special value |
x |
An object of class |
width |
Passed to |
min.split |
Passed to |
list.ok |
If the object has multiple by-variables, is it okay to return a list of data.frames instead of a single data.frame?
If |
An object of class summary.tableby
Ethan Heinzen, based on code by Gregory Dougherty, Jason Sinnwell, Beth Atkinson, adapted from SAS Macros written by Paul Novotny and Ryan Lennon
set.seed(100) ## make 3+ categories for response nsubj <- 90 mdat <- data.frame(Response=sample(c(1,2,3),nsubj, replace=TRUE), Sex=sample(c("Male", "Female"), nsubj,replace=TRUE), Age=round(rnorm(nsubj,mean=40, sd=5)), HtIn=round(rnorm(nsubj,mean=65,sd=5))) ## allow default summaries on RHS variables out <- tableby(Response ~ Sex + Age + HtIn, data=mdat) summary(out, text=TRUE) labels(out) labels(out) <- c(Age="Age (years)", HtIn="Height (inches)") summary(out, stats.labels=c(meansd="Mean-SD", q1q3 = "Q1-Q3"), text=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.