Question: 1. How many rows and columns are in iris? 2. Create a new data frame named sub1 which includes only the first 3 rows and


1. How many rows and columns are in iris? 2. Create a new data frame named sub1 which includes only the first 3 rows and the last row of iris. Display subl. 3. Create a new data frame named sub2 which includes only rows in iris where the Sepal . Length is greater than 7.2 and includes only the columns Sepal . Length, Sepal. Width, and Species. Display sub2. 4. Create a vector named Virginica . Is. The. Best, which has the value 10 whenever the variable Species (from iris) is equal to "virginica" and has the value 0 otherwise. Display Virginica . Is . The . Best. 5. Save the column named Petal . Width (from iris) as its own vector named pw. Use functions to find the mean, median, maximum, and minimum of pw. We didn't talk about all of these in class, but you should be able to find them with a little Googling and/ or guessing.]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
