Question: First Dynamic Report about the iris dat set/ using R language to: 1. What are the column names and data types of the different columns

First Dynamic Report

about the iris dat set/ using R language to:

1. What are the column names and data types of the different columns in iris?

2. How many rows and columns does iris have?

3. Create a single vector (a new object) called width that is the Sepal.Width column of iris.

4. What is the 100th value in your width vector?

5. What is the last value in your width vector? Can you write code that returns this value even if you dont know how long width is?

6. Select rows 10 to 20, with all columns in the iris dataset.

7. Select rows 10 to 20 with only the Species, Petal.Width and Petal.Length. Can you do this two different ways?

8. Select rows 1 to 10, 20, and 100 in the iris dataset.

9. Select the first value in the Sepal.Length column of the iris dataset. Bonus - can you do this three different ways?

10. Without running the following code in R, try to determine which of the following will return the first three rows of the Sepal.Length column in the iris data.frame? For each of the answers that do not work, see if you explain why!

a. iris[c(1, 2, 3), Sepal.Length]

b. iris[1, 2, 3, Sepal.Length]

c. iris[(1, 2, 3), Sepal.Length]

d. iris[Sepal.Length, c(1, 2, 3)]

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!