Question: Question 1 Use the diamonds dataset to solve this problem: - Create a new tibble called diamonds2 that filters out all diamonds that have a
Question 1 Use the diamonds dataset to solve this problem: - Create a new tibble called "diamonds2" that filters out all diamonds that have a y value smaller than 3 or greater than 20 (retain diamonds between 3 and 20). - Create a new tibble called "diamonds3" that takes diamonds 2 and adds a new column that contains the word "colorless" if color is DEF or "yellowish" if it is any other color code. - Create a new tibble called "diamonds4" that uses a filter to only include diamonds with carat weight greater than 2 and color of "colorless." [paste your code here] How many rows are in the diamonds4 tibble? What is the cheapest diamond in the diamonds4 tibble? Question 2 Redo question 1, except do the entire thing using one "line" of code and the pipe function. Do not create multiple versions of the diamonds data frame along the way
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
