Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use R as coding language Question 7 The objective of this question is to introduce the matplotO function and give further practice with optional arguments

use R as coding language

image text in transcribed
Question 7 The objective of this question is to introduce the matplotO function and give further practice with optional arguments and low level functions. (a) Compute the mean price for each color and cut combination in the diamonds data, and store the result. The result should be a matrix object, where the rows correspond to the levels of color and the columns correspond to the levels of cut. Him: This computation can be done with one command. (b) The matplot 0 function plots columns of a matrix (or plots columns of one matrix against the columns of another). Use the matplot 0 function on the output from (a) to create a line plot with a separate line for each level of cut. a Distinguish each line by separate line types, line widths, and for colors of your choice. 0 Use the xaxt = "n" argument to suppress the tick marks and labels on the m-axis, then use the axis() function to set the at-aans labels to be the levels of the color variable. a Add a legend that explains the differences in the lines in the plot. (C) Interpret the line plot from (13). Does it appear that the mean price of diamonds differs for different levels of color? For different levels of cut? Which levels tend to have higher mean prices

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

Complex Variables And Applications

Authors: James Brown, Ruel Churchill

9th Edition

0073530859, 9780073530857

More Books

Students also viewed these Mathematics questions