Question: Preparing the data (20%) Using Cars93 Move Model to column1. One way is to use the dplyr library from the tidyverse package. Let the model

Preparing the data (20%)

Using Cars93

Move "Model" to column1. One way is to use the dplyr library from the tidyverse package.

Let the model names be your rownames (not to be used as data, but will be the name of each row). See James textbook, page 55 for some guidance.

XX Ensure that the data is complete before doing the analysis. Look for "NA" entries, especially in the "Rear.seat.room" and "Luggage.room" columns. You may choose to replace "NA" with 0.

Look at the spelling of "Chrysler" as you go down the column. Fix the error.

"Cylinders" has a non-numeric term. Make an appropriate decision.

If necessary, replace qualitative data with quantitative data.

For binary data, e.g. Origin: USA/non-USA can be coded 1 or 0. Do you need two columns, or one? You can use the dummy( ) function from the dummies package.

For nominal or ordinal data, egDriveTrain, you can use 3 sets of binary data columns: Front : 1 or 0, Rear: 1 or 0, and 4WD: 1 or 0. You can use the dummy_cols( ) function in the fastDummies package.

Remove the original columns of categorical/binary data if dummies have been substituted.

You can remove columns of data that you think are unnecessary, but you must justify that decision

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