vis_value | R Documentation |
Visualise all of the values in the data on a 0 to 1 scale. Only works on numeric data - see examples for how to subset to only numeric data.
vis_value(data, na_colour = "grey90", viridis_option = "D")
data |
a data.frame |
na_colour |
a character vector of length one describing what colour you want the NA values to be. Default is "grey90" |
viridis_option |
A character string indicating the colormap option to use. Four options are available: "magma" (or "A"), "inferno" (or "B"), "plasma" (or "C"), "viridis" (or "D", the default option) and "cividis" (or "E"). |
a ggplot plot of the values
vis_value(airquality) vis_value(airquality, viridis_option = "A") vis_value(airquality, viridis_option = "B") vis_value(airquality, viridis_option = "C") vis_value(airquality, viridis_option = "E") ## Not run: library(dplyr) diamonds %>% select_if(is.numeric) %>% vis_value() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.