Access over 20 million homework & study documents

Docx 27

Content type
User Generated
School
Harrisburg University of Science and Technology
Rating
Showing Page:
1/4
Answer 1
ggplot2 - Bar Plot: (Use dataset_student_survey_data.csv)
x=Smoke
fill=Exer
position=dodge
facet=Sex
x-label=Smoker
y-label=Counts
title=The Exercise habits of Male and Female students that smoke
Answer 2
ggplot2 Histogram: (Use dataset_us_car_price_data.csv)
x=Price
fill=Type
facet=Type
x-label=Price
y-label=Freq

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/4
title=Car Price Distribution based on Car Type
R studio could not produce graph for this because Price is a discrete variable
whereas it needs to be a continuous variable. Following is the syntax used to
produce the chart and also the error from R studio.
ggplot(dpc, aes(x=Price, fill=Type)) + theme_bw() + facet_wrap(~Type) +
geom_histogram() + labs(x="Price" ,y="Freq" ,title="Car Price Distribution based on
Car Type")
Error: StatBin requires a continuous x variable: the x variable is discrete. Perhaps
you want stat="count"?
Answer 3
ggplot2 - Box Plot: (Use dataset_production_of_rice_in_indonesia.csv)
x=varieties
y=price
fill=bimas
facet=status
x-label=Rice Varieties
x-label=Price
title=Indonesia Rice Prices based on Varieties, Land Status, and Bimas Program

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/4

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 4 pages?
Access Now
Unformatted Attachment Preview
Answer 1 • • • • • • • ggplot2 - Bar Plot: (Use dataset_student_survey_data.csv) x=Smoke fill=Exer position=dodge facet=Sex x-label=Smoker y-label=Counts title=The Exercise habits of Male and Female students that smoke • • • • • ggplot2 – Histogram: (Use dataset_us_car_price_data.csv) x=Price fill=Type facet=Type x-label=Price y-label=Freq Answer 2 • title=Car Price Distribution based on Car Type R studio could not produce graph for this because Price is a discrete variable whereas it needs to be a continuous variable. Following is the syntax used to produce the chart and also the error from R studio. ggplot(dpc, aes(x=Price, fill=Type)) + theme_bw() + facet_wrap(~Type) + geom_histogram() + labs(x="Price" ,y="Freq" ,title="Car Price Distribution based on Car Type") Error: StatBin requires a continuous x variable: the x variable is discrete. Perhaps you want stat="count"? Answer 3 • • • • • • • ggplot2 - Box Plot: (Use dataset_production_of_rice_in_indonesia.csv) x=varieties y=price fill=bimas facet=status x-label=Rice Varieties x-label=Price title=Indonesia Rice Prices based on Varieties, Land Status, and Bimas Program Answer 4 ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Just what I needed…Fantastic!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Documents