0% found this document useful (0 votes)
40 views1 page

Week 7 R Lab

The document provides instructions for an R lab analyzing a dataset of used car prices and mileage. The instructions include loading the dataset, examining the structure and column names, calculating summary statistics like mean and quintiles for price and mileage, drawing boxplots and histograms of the data, calculating variance and standard deviation of prices, investigating categorical data with tables, and exploring the relationship between mileage and price with plots.

Uploaded by

Uli23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views1 page

Week 7 R Lab

The document provides instructions for an R lab analyzing a dataset of used car prices and mileage. The instructions include loading the dataset, examining the structure and column names, calculating summary statistics like mean and quintiles for price and mileage, drawing boxplots and histograms of the data, calculating variance and standard deviation of prices, investigating categorical data with tables, and exploring the relationship between mileage and price with plots.

Uploaded by

Uli23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Week

7 R Lab


Download the data file usedcars,csv from Moodle


1. Load the usedcars.csv data into R.

2. What are the column names?

3. What is the structure of the data frame (i.e. how many row / cols and what
type are they).

4. What is the mean price and mileage?

5. Calculate the quintiles (i.e. 5 evenly spaced regions) for the price range

6. Draw a boxplot of the price and mileage attributes. Label the plots "Boxplot of
Used Car Prices" and "Boxplot of Used Car Mileage" respectively. Dont forget to
label the y-axes of the plots.

7. Draw a histogram of the price and mileage attributes.

8. Calculate the variance and standard deviation of car Prices

9. Investigate the categorical data using the table () command

10. Investigate the relationship between mileage and price using the plot
command

You might also like