counts <- table(mtcars$gear)

print(counts)

barplot(counts, main="Car Distribution", xlab="Number of Gears")

#PLOTTING BOX PLOTS IN R LANGUAGE.
boxplot(mpg~cyl,data=mtcars, main="Car Milege Data", xlab="Number of Cylinders", ylab="Miles per Gallon")

#Plotting Histograms in R Language.
x <- rnorm(1000)
hx <- hist(x, breaks=100, plot=FALSE)
plot(hx, col=ifelse(abs(hx$breaks) < 1.669, 4, 2))
#Another Example of Histograms.
hist(mtcars$mpg)

hist(mtcars$mpg, breaks=25, col="blue")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: