Learn R Programming

epiDisplay (version 3.5.0.2)

summ: Summary with graph

Description

Summary of data frame in a convenient table. Summary of a variable with statistics and graph

Usage

summ(x, ...) 
# S3 method for default
summ(x, by=NULL, graph = TRUE, box = FALSE, pch = 18, 
    ylab = "auto", main = "auto", cex.X.axis = 1, cex.Y.axis = 1,
    dot.col = "auto", ...)
# S3 method for factor
summ(x, by=NULL, graph=TRUE, ...)
# S3 method for logical
summ(x, by=NULL, graph=TRUE, ...)
# S3 method for data.frame
summ(x, ...)

Arguments

x

'x' can be a data frame or a vector

by

a stratification variable, valid only when x is a vector

graph

automatic plot (sorted dot chart) if 'x' is a vector

box

add a boxplot to the graph (by=NULL)

pch

plot characters

ylab

annotation on Y axis

main

main title of the graph

cex.X.axis

character extension scale of X axis

cex.Y.axis

character extension scale of Y axis

dot.col

colour(s) of plot character(s)

...

additional graph parameters

Details

For data frames, 'summ' gives basic statistics of each variable in the data frame. The other arguments are ignored.

For single vectors, a sorted dot chart is also provided, if graph=TRUE (default).

See Also

'summary', 'use', 'des'

Examples

Run this code
# NOT RUN {
data(Oswego)
.data <- Oswego
summ(.data)
with(.data, summ(age))
with(.data, summ(age, box=TRUE))
with(.data, summ(age, dot.col="brown"))
with(.data, summ(age, by=sex))
# Changing dot colours
with(.data, summ(age, by=sex, dot.col = c("blue","orange")))
# Enlarging main title and other elements
with(.data, summ(age, by=sex, cex.main=1.5, cex.X.axis=1.5, cex.Y.axis=1.7))

# Free vector
summ(rnorm(1000))
summ((1:100)^2, by=rep(1:2, 50))
summ((1:100)^2, by=rep(c("Odd","Even"), 50), main="Quadratic distribution by odd and even numbers")
# }

Run the code above in your browser using DataLab