Create's a histogram using the hist() function.
Syntax hist(data)
# Example data
data <- c(22, 30, 25, 40, 35, 28, 45, 50, 32, 38, 42, 27, 33, 29, 31)
# Create a histogram
hist(data, main = "Histogram", xlab = "Values", ylab = "Frequency", col = "skyblue")
We can use attributes to make a difference.
data <- c(22, 30, 25, 40, 35, 28, 45, 50, 32, 38, 42, 27, 33, 29, 31)
hist(data, main = "Customized Histogram", xlab = "Values", ylab = "Frequency", col = "salmon", border = "black", breaks = 5)
The Concepts and codes you leart practice in Compilers till you are confident of doing on your own. A Various methods of examples, concepts, codes availble in our websites. Don't know where to start Down some code examples are given for this page topic use the code and compiler.