Question: State an R function that can be used to read a csv file. (1 mark) b) The following information show various cars with different

State an R function that can be used to read a csv file. (1 mark) b) The following information show various cars with different aspects of performance, including miles/gallon (mpg), number of cylinders (cyl), displacement (disp), rear axle ratio (drat) and weight (wt). Based on these information, answer the following questions. UTM mpg cyl hp. drat wt Mozda 21.0 160.0 110 3.90 2.620 8 UTM & UTM Proten 21.0 6 160.0 110 3.90 2.875 Nissen 22.8 4 108.0 93 3.85 2.320 UT Peroduo 18.7 8 360.0 175 3.15 3.440 Suziko 18.1 6 105 2.76 3.460 data.frame: 5 obs. of 6 variables: 5 obs. of UTM 25. num 21 21 22.8 18.7 18.1 $ cylnum 66486 $ mpg UTM $ hp $ disp: num num $ drat: num $ wt : num 160 160 108 360 225 110 110 93 175 105 3.9 3.9 3.85 3.15 2.76 2.62 2.88 2.32 3.44 3.46 UTM UTM & UTM 8 UTM UTM 8 UTM UT Write the information for mpg and disp in the form of data vectors by assigning two R commands, to be stored in R objects called C1 and C2 respectively. UTM Using R objects C1 and C2, answer the following questions M UTM UTM (3 marks) UTM) Write four separate R commands to calculate the average and variability for UTM car displacement and car weight respectively. (4 marks) ii) Write the R command to calculate the correlation between car displacement and car weight. iii) Write the R commands to draw box plots for the UTM and car weight. iv) Write the R commands to extr (1 mark) variables car displacement the residuals from a fitted linear model of car displacement on car weight. UTM (2 UTM U (3 marks) M

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 Programming Questions!