plot.compare_numeric: Visualize Information for an "compare_numeric" Object

Description Usage Arguments See Also Examples

Description

Visualize scatter plot included box plots by attribute of compare_numeric class.

Usage

1
2
## S3 method for class 'compare_numeric'
plot(x, prompt = FALSE, typographic = TRUE, ...)

Arguments

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.

...

arguments to be passed to methods, such as graphical parameters (see par). However, it does not support.

See Also

compare_numeric, print.compare_numeric, summary.compare_numeric.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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)

bit2r/kodlookr documentation built on Dec. 19, 2021, 9:49 a.m.