plot.compare_numeric | R Documentation |
Visualize scatter plot included box plots by attribute of compare_numeric class.
## S3 method for class 'compare_numeric'
plot(x, prompt = FALSE, typographic = TRUE, base_family = NULL, ...)
x |
an object of class "compare_numeric", usually, a result of a call to compare_numeric(). |
prompt |
logical. The default value is FALSE. If there are multiple visualizations to be output, if this argument value is TRUE, a prompt is output each time. |
typographic |
logical. Whether to apply focuses on typographic elements to ggplot2 visualization. The default is TRUE. if TRUE provides a base theme that focuses on typographic elements using hrbrthemes package. |
base_family |
character. The name of the base font family to use for the visualization. If not specified, the font defined in dlookr is applied. (See details) |
... |
arguments to be passed to methods, such as graphical parameters (see par). However, it does not support. |
The base_family is selected from "Roboto Condensed", "Liberation Sans Narrow", "NanumSquare", "Noto Sans Korean". If you want to use a different font, use it after loading the Google font with import_google_font().
NULL. This function just draws a plot.
compare_numeric
, print.compare_numeric
, summary.compare_numeric
.
# Generate data for the example
heartfailure2 <- heartfailure[, c("platelets", "creatinine", "sodium")]
library(dplyr)
# Compare the all numerical variables
all_var <- compare_numeric(heartfailure2)
# Print compare_numeric class object
all_var
# Compare the two numerical variables
two_var <- compare_numeric(heartfailure2, sodium, creatinine)
# Print compare_numeric class objects
two_var
# plot all pair of variables
plot(all_var)
# plot a pair of variables
plot(two_var)
# plot all pair of variables by prompt
plot(all_var, prompt = TRUE)
# plot a pair of variables not focuses on typographic elements
plot(two_var, typographic = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.