Question: Write R code on Rstudio 1 . MASS package includes data set named Cars 9 3 . Load the MASS package first to use the
Write R code on Rstudio
MASS package includes data set named Cars Load the MASS package first to use the Cars data set. There are total observations. Type namesCarsto see the variables in the data set.
a Create a table to summarize AirBags variable.
b Calculate the percentage of each category in the table you obtained in a
c Create a pie chart to visualize AirBags variable. Use different colors to represent each category. Copy and paste the final plot.
d Create a D pie chart to visualize AirBags variable. Use different colors to represent each category and specify label names. Copy and paste the final plot.
e Create a table to summarize Type variable.
f Create a bar graph to visualize Type variable. Use different colors to represent each category. Copy and paste the final plot.
g Create a table to summarize two categorical variables; AirBags and Origin.
h Create a grouped bar graph with AirBags and Origin variables. Use different colors and legend to make the plot as descriptive as possible. Copy and paste the final plot.
i Create a table to summarize two categorical variables; Type and DriveTrain.
j Create a grouped bar graph with Type and DriveTrain variables. Use different colors and legend to make the plot as descriptive as possible. Copy and paste the final plot.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
