Module 7 - Distribution Analysis
For this module, we were assigned to create a visualization based on distribution analysis. I created a bar graph based on the mpg table of the mtcars dataset in R. Below is my graph:
This graph shows the miles per gallon of each vehicle in the mtcars dataset. A drawback of this graph is that the vehicles are not identified on the x axis, therefore, the graph does not demonstrate the best information on distribution for this dataset.
Here is the code:
data("mtcars")
head(mtcars)
counts <- table(mtcars$mgp)
counts2 <- table(mtcars$wt)
counts
View(mtcars)
barplot(mtcars$mpg, main = "Miles per Gallon", xlab = "MPG", ylab = "count", col = "orange")

Comments
Post a Comment