table_heat {wakefield} | R Documentation |
View Data Table Column Types as Heat Map
Description
Generate a heat map of column types from a data.frame
.
Usage
table_heat(
x,
flip = FALSE,
palette = "Set3",
print = interactive(),
sep = "\n"
)
Arguments
x |
A |
flip |
logical. If |
palette |
A palette to chose from. See
|
print |
logical. If |
sep |
A separator to use between column types. Column types are
determined via |
Details
By default coumn names retain their order. Column types are ordered
alphabetically in the legend, with NA
appearing last.
Value
Returns a ggplot2 object.
Examples
table_heat(mtcars) #boring
table_heat(CO2)
table_heat(iris)
table_heat(state_populations)
dat <- r_data_frame(100,
lorem_ipsum,
birth,
animal,
age,
grade, grade,
death,
dummy,
grade_letter
)
table_heat(dat)
table_heat(dat, flip=TRUE)
table_heat(r_data_theme(), flip=TRUE)
## NA values
table_heat(r_na(dat, NULL))
## Colors
table_heat(r_na(dat, NULL), palette = NULL)
table_heat(r_na(dat, NULL), palette = "Set1")
table_heat(r_na(dat, NULL), palette = "Set2")
table_heat(r_na(dat, NULL), palette = "Set1")
table_heat(r_na(dat, NULL), palette = "Dark2")
table_heat(r_na(dat, NULL), palette = "Spectral")
table_heat(r_na(dat, NULL), palette = "Reds")