A built-in iris data set gives the measurements in centimeters of the variables sepal length & width and petal length & width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica. Please use ?iris for further details. (When you answer the following questions, don't output the data table as it would take up too much space in your R. Markdown document.) (i) Obtain a data subset that contains Sepal. Length, Petal. Length, Species variables and the last 25 observations. Save it in a variable named iris_sub1. For the answer, show your subsetting code and output of the data dimension by using dim() function. (ii) Obtain a data subset such that Petal. Length is less than 1.5 OR greater than or equal to 5. Save it in a variable named iris_sub2. Show your subsetting code and output of the data dimension. (iii) Obtain a data subset such that (Petal. Length is less than 1.5 OR greater than or equal to 5) AND (Species is virginica). Save it in a variable named iris_sub3. Show your subsetting code and output of the data dimension. (iv) Further subset iris_sub3 so that the new subset data contains only two variables: Petal. Length & Petal.Width. Save it in a variable named iris_sub4. Show your subsetting code and output of the data dimension.
A built-in iris data set gives the measurements in centimeters of the variables sepal length & width and petal length & width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica. Please use ?iris for further details. (When you answer the following questions, don't output the data table as it would take up too much space in your R. Markdown document.) (i) Obtain a data subset that contains Sepal. Length, Petal. Length, Species variables and the last 25 observations. Save it in a variable named iris_sub1. For the answer, show your subsetting code and output of the data dimension by using dim() function. (ii) Obtain a data subset such that Petal. Length is less than 1.5 OR greater than or equal to 5. Save it in a variable named iris_sub2. Show your subsetting code and output of the data dimension. (iii) Obtain a data subset such that (Petal. Length is less than 1.5 OR greater than or equal to 5) AND (Species is virginica). Save it in a variable named iris_sub3. Show your subsetting code and output of the data dimension. (iv) Further subset iris_sub3 so that the new subset data contains only two variables: Petal. Length & Petal.Width. Save it in a variable named iris_sub4. Show your subsetting code and output of the data dimension.
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter7: Creating Templates, Importing Data, And Working With Smartart, Images, And Screenshots
Section: Chapter Questions
Problem 19AYK
Related questions
Question
Using R language
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 4 images
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning