Find the mtcars data in R. This is the dataset that you will use to create your graphics. Use that data to draw by hand graphics for the next 4 questions.
1.Draw a pie chart showing the proportion of cars from the mtcars data set that have different carb values.
# To find the number of cars for each carb number
carb_number <- table(mtcars$carb)
carb_number
##
## 1 2 3 4 6 8
## 7 10 3 10 1 1
# To find the number of cars for each gear number
gear_number <- table(mtcars$gear)
gear_number
##
## 3 4 5
## 15 12 5
# To find the number of cars for each cyl under different gear number
gear_cyl <- table(mtcars$cyl,mtcars$gear)
gear_cyl
##
## 3 4 5
## 4 1 8 2
## 6 2 4 1
## 8 12 0 2
5.Design a visualization of your choice using the data.