mtcars_xtab {tablesgg} | R Documentation |
Table of Data from Motor Trend Magazine
Description
This is a table of selected observations and variables from the data frame
mtcars
from package datasets.
Usage
mtcars_xtab
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:
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
Henderson and Velleman (1981), Building multiple regression models interactively. Biometrics, 37, 391-411.
See Also
mtcars
Examples
ttbl <- textTable(mtcars_xtab)
plot(ttbl, rowheadInside=TRUE)
[Package tablesgg version 0.9-1 Index]