The famous data set iris which gives the 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 is available in R. Type iris directly to see what it looks like.
(a) Selecting the observations (rows) whose Species are versicolor.
(b) Selecting the observations whose Speices are either versicolor or virginica.
(c) Selecting the observations whose Sepal.Width are greater than 2.9 but less than 3.5.
(d) Combine the data frames you got in part (a) and part (c) to one data frame.
(e) You may have some duplicated observations in the data frame you obtained in part (d). Use the command ?unique to learn the usage of the function unique and then utilize it to remove duplicated rows from the data frame you obtained in part (d).
R CODE:
iris
# Q1.
iris_a = iris[iris$Species == "versicolor", ]
iris_a
# Q2.
iris_b = iris[iris$Species == "versicolor" | iris$Species ==
"virginica" , ]
iris_b
# Q3.
iris_c = iris[iris$Sepal.Width > 2.9 & iris$Sepal.Width
< 3.5 , ]
iris_c
# Q4.
iris_d = rbind(iris_a, iris_c)
iris_d
# Q5.
iris_e = unique(iris_d)
iris_e
# Result related
> nrow(iris_d)
[1] 118
> nrow(iris_e)
[1] 102
The famous data set iris which gives the measurements in centimeters of the variables sepal length...
M14. #18: Wild irises are beautiful flowers found throughout the United States, Canada, and northern Europe. This problem concerns the length of the sepal (leaf-like part covering the flower) of different species of wild iris. Data are based on information taken from an article by R. A. Fisher in Annals of Eugenics (Vol. 7, part 2, pp. 179 -188). Measurements of sepal length in centimeters from random samples of Iris setosa (I), Iris versicolor (II), and Iris virginica (III) are...
18) Wild irises are beautiful flowers found throughout the United States, Canada, and northern Europe. This problem concerns the length of the sepal (leaf-like part covering the flower) of different species of wild iris. Data are based on information taken from an article by R. A. Fisher in Annals of Eugenics (Vol. 7, part 2, pp. 179 -188). Measurements of sepal length in centimeters from random samples of Iris setosa (I), Iris versicolor (II), and Iris virginica (III) are as...
IN R CODE, consider the following data in the table:
These figures provide the depths (in centimeters) at which
important archaeological finds were made at four sites in New
Mexico
(see Woosley and Mcintyre, 1996). Store these data in your R
workspace, with one vector containing depth and the other
vector
containing the site of each observation.
a. Produce side-by-side boxplots of the depths split by group,
and
use additional points to mark the locations of the sample
means.
b....
Wild irises are beautiful flowers found throughout the United States, Canada, and northern Europe. This problem concerns the length of the sepal (leaf-like part covering the flower) of different species of wild iris. Data are based on information taken from an article by R. A. Fisher in Annals of Eugenics (Vol. 7, part 2, pp. 179 -188). Measurements of sepal length in centimeters from random samples of Iris setosa (I), Iris versicolor (II), and Iris virginica (III) are as follows...
points BBUnderStat12 105 Wild irises are beautiful flowers found throughout the United States, Canada, and northern Europe. This roblem concerns the length of the se al af ire part covering hem different species of wild iris. Data are based on information taken from an artidle by R. A. Fisher in Annals of Eugenics (Vol. 7, part 2, pp. 179 -188). Measurements of sepal length in centimeters from random samples of Iris setosa (t), Iris versicolor (11), and iris virginica (III)...