Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#2. Dataframes. Recall that if the data is included in R, you can simply type the name of the dataset to use it. For example,

image text in transcribed
\#2. Dataframes. Recall that if the data is included in R, you can simply type the name of the dataset to use it. For example, the first 6 lines of the 'iris' dataset can displayed using the code: {r} head(iris, 6) a. Change the above code to display the first 3 lines of the iris dataset. Also google (or guess) to find out how to display the last 3 lines of the dataset. b. Use the $ notation to extract the Sepal Length column of iris. Then use ordinary vector indexing to extract 12 th through 17 th entries of that column. ".." {r} c. Look up (Google, or Stack Overflow. ..) the 'unique' command in R. Use it to determine how many unique species are represented in the iris dataset ( 1 understand that you can just look at the dataset in this case-don't do that this way.) d. What is the largest Petal Length in the data set? What is the smallest? What is the average Petal Length? Can you find an R command to determine which species these correspond to? " {r}3 e. Try using the 'which' command to determine the irises in this dataset which have a Petal Length larger than 5 . Create a dataframe which contains only such irises. Which species do these largely correspond to? {r} f. Use an R command to find irises which have a petal length larger than 5 OR a petal length smaller than 1.5. Which species do these correspond to? g. Are there any irises with petal length than 5 and petal width larger than 2.4 ? If so, what are they

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions

Question

List the components of the strategic management process. page 72

Answered: 1 week ago