heat_map | R Documentation |
R wrapper for @visa/heat-map via htmlwidgets.
Here is an example of heat-map in action:
heat_map(
data,
xAccessor,
yAccessor,
valueAccessor,
mainTitle = "",
subTitle = "",
accessibility = list(),
props = list(),
...
)
data |
required to be a valid, R data frame. Data used to create chart, an array of objects which includes keys that map to chart accessors. |
xAccessor |
String. Key used to determine the x-axis categorical value. (similar to x in ggplot) |
yAccessor |
String. Key used to determine the y-axis categorical value. (similar to y in ggplot) |
valueAccessor |
String. Key used to determine heatmap's numeric property, for assigning color. |
mainTitle |
String. The dynamic tag of title for the map (or you can create your own separately). See |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
accessibility |
List(). Manages messages and settings for chart accessibility, see object definition |
props |
List(). A valid R list with additional property configurations, see all props for @visa/heat-map |
... |
All other props passed into the function will be passed through to the chart, see all props for @visa/heat-map. |
To see all available options for the chart properties/API see @visa/heat-map.
a visaChart htmlwidget object for plotting a heat map
library(dplyr)
data.frame(UCBAdmissions) %>%
filter(Admit == "Rejected") %>%
heat_map("Dept","Gender", "Freq")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.