This is a simple Shiny app to plot a histogram. Meant as a gentle introduction to Shiny inputs and outputs.
shiny_hist(
data,
x,
title = "Histogram",
xlab = "x",
ylab = "y",
main = "Histogram",
col = "blue",
bins = 10,
xlim = range(bins),
ylim = NULL,
border = "black",
lwd = 1,
lty = 1,
cex = 1,
cex.main = 1,
cex.lab = 1,
cex.axis = 1,
cex.sub = 1
)
Data frame
Name of column in data
plot. Must be a numeric vector.
Title of the plot.
X-axis label.
Y-axis label.
Main title.
Color of the bars.
Number of bins.
Limits of the x-axis.
Limits of the y-axis.
Color of the border.
Line width of the border.
Line type of the border.
Axis label size.
Main title size.
Axis label size.
Axis tick label size.
Subtitle size.
A Shiny app to plot a histogram.
if (FALSE) {
data <- data.frame(x = rnorm(100))
shiny_hist(data, x = "x")
}