Question: I need assistance with coding, in RStudio 3.5.2 Consider the iris dataset. It has 150 rows and 5 columns and contains measurements in centimeters of

I need assistance with coding, in RStudio 3.5.2

Consider the iris dataset. It has 150 rows and 5 columns and contains measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica. head(iris, 3) ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3.0 1.4 0.2 setosa ## 3 4.7 3.2 1.3 0.2 setosa Using the ggplot2 package, a) write code to create a scatter plot of Petal.Length versus Petal.Width, with the variable Species mapped to color; b) add appropriate title to the plot; c) write code to create side by side box plots of Sepal.Length for each specie of iris.

This is what I have so far what am I missing?

ggplot(data = iris)+

geom_point(mapping = aes (x = Petal.Length, y = Petal.Width))+

facet_grid(~Species, scales = "free")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!