mtcars_xtab: Table of Data from Motor Trend Magazine

Description Usage Format Source See Also Examples

Description

This is a table of selected observations and variables from the data frame mtcars from package datasets.

Usage

1

Format

An xtableList object as produced by version 1.8-4 of the xtable package (https://CRAN.R-project.org/package=xtable). The table was produced with the following code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data("mtcars", package="datasets")
mtcars <- mtcars[, 1:6]
mtcarsList <- split(mtcars, f = mtcars$cyl)
### Reduce the size of the list elements
mtcarsList[[1]] <- mtcarsList[[1]][1,]
mtcarsList[[2]] <- mtcarsList[[2]][1:2,]
mtcarsList[[3]] <- mtcarsList[[3]][1:3,]
attr(mtcarsList, "subheadings") <- paste0("Number of cylinders = ",
                                          names(mtcarsList))
attr(mtcarsList, "message") <- c("Line 1 of Message", "Line 2 of Message")
mtcars_xtab <- xtable::xtableList(mtcarsList, digits = c(0,2,0,0,0,1,2),
                                caption = "Caption to List")
  

Source

See Also

mtcars

Examples

1
2
  ttbl <- textTable(mtcars_xtab)
  plot(ttbl, rowheadInside=TRUE)

tablesgg documentation built on June 3, 2021, 1:06 a.m.