Description Usage Arguments Details Note Examples
A quick heatmap function for visualizing typical qdap dataframe/matrix outputs.
1 2 3 4 5 |
mat |
A matrix or dataframe produced by many qdap
functions in which the first column is the grouping
variable and the rest of the matrix is numeric. Also
accepts objects directly from
|
low |
The color to be used for lower values. |
high |
The color to be used for higher values. |
values |
logical. If TRUE the cell values will be included on the heatmap. |
digits |
The number of digits displayed if
|
text.size |
A integer size to plot the text if
|
text.color |
A character vector to plot the text if
|
xaxis.col |
A single character vector color choice for the high values. |
yaxis.col |
A single character vector color choice for the low values. |
order.by |
An optional character vector of a
variable name to order the columns by. To reverse use a
negative ( |
grid |
The color of the grid (Use NULL to remove the grid). |
by.column |
logical. If TRUE applies scaling to the column. If FALSE applies scaling by row (use NULL to turn off scaling). |
auto.size |
logical. IF TRUE the visual will be resized to create square cells. |
mat2 |
A second matrix equal in dimensions to
|
qheat
is useful for finding patterns and anomalies
in large qdap generated dataframes and matrices.
qheat
is a fast way of working with
data formats produced by qdap. The function isn't
designed to be extended beyond exploratory qdap usage.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | dat <- sentSplit(DATA, "state")
ws.ob <- with(dat, word_stats(state, list(sex, adult), tot=tot))
qheat(ws.ob)
qheat(ws.ob, order.by = "sptot",
xaxis.col = c("red", "black", "green", "blue"))
qheat(ws.ob, order.by = "sptot")
qheat(ws.ob, order.by = "-sptot")
qheat(ws.ob, values = TRUE)
qheat(ws.ob, values = TRUE, text.color = "red")
qheat(ws.ob, "yellow", "red", grid = FALSE)
dat1 <- data.frame(G=LETTERS[1:5], matrix(rnorm(20), ncol = 4))
dat2 <- data.frame(matrix(LETTERS[1:25], ncol=5))
qheat(dat1, values=TRUE)
qheat(dat1, values=TRUE, mat2=dat2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.