hist_plot {AnalysisLin} | R Documentation |
Histogram Plot for Numerical Variables
Description
This function generates histogram plots for all numerical variables in the input data frame. It offers a vivid and effective visual summary of the distribution of each numerical variable, helping in a quick understanding of their central tendency, spread, and shape.
Usage
hist_plot(
data,
fill = "skyblue",
color = "black",
alpha = 0.7,
subplot = FALSE,
nrow = 2,
margin = 0.1,
html = FALSE
)
Arguments
data |
The input data frame containing numerical variables. |
fill |
The fill color for the histogram bars (default: "skyblue"). |
color |
The border color for the histogram bars (default: "black"). |
alpha |
The alpha (transparency) value for the histogram bars (default: 0.7). |
subplot |
A logical argument (default: FALSE) indicating whether to create subplots for each variable. |
nrow |
Number of rows for subplots (used when subplot is TRUE, default: 2). |
margin |
Margin for subplots (used when subplot is TRUE, default: 0.1). |
html |
Whether the output should be in HTML format,used when knitting into HTML. Default is FALSE. |
Value
A list of histogram plot.
Examples
hist_plot(data = mtcars, fill = "skyblue", color = "black", alpha = 0.7, subplot = FALSE)