Question: Write a function in R, called myDiamondManipulatorO that has a primary input argument reserved for the dia- monds dataset and does the following: (a) Has

 Write a function in R, called myDiamondManipulatorO that has a primary

Write a function in R, called myDiamondManipulatorO that has a primary input argument reserved for the dia- monds dataset and does the following: (a) Has a default input arguments cut "Premium", and color NULL. Note the colors are specified by "D" ..E'', ''F', G,,, ..H',' ..!", "J", otherwise. It should be able to handle reading in individual values or character arrays such as cut cFair". "Very Good"). color c(E" "H". "J"), etc. (b) Determines the second highest price for the color specified in the input. If no color is specified, then return the second highest price for all of the colors in the dataset. (c) Determines the average price for each combination of cut and color specified in the input arguments. If no color is specified, then return the average price for every combination of cut and color in the dataset (d) Determines today's date. (e) Plots the price versus carat for the specified cut diamonds. (f) Returns the objects from (b-d), in outputs: pricein2, meanPriceByColor, studyDate

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!