assessment 1

profileNIYATI
Assessment12.docx

Assessment 1

Basic Graphs with ggplot2

For assessment 1 you are to complete the problems by providing one of the following:

1. Visual representation of the information,

2. A detailed explanation of the answer,

3. Visual representation and detailed explanation.

When providing a visual representation, screenshot the solution.

It is recommended to use RStudio for all assessments.

1 – Run ggplot(data = mpg). What do you see?

Import the necessary package, tidyverse, and load the mpg data from the ggplot2 package.

2 – How many rows are in mpg? How many columns?

To get the dimensions of a data matrix, we can simply use the function ‘dim()’.

3 – What does the drv variable describe? Read the help for ?mpg to find out.

4 -Make a scatterplot of hwy vs cyl.

5 – What happens if you make a scatterplot of class vs drv? Why is the plot not useful?

Link

https://www.youtube.com/watch?v=nYR8DrJHLLQ

https://www.youtube.com/watch?v=mcYcjH-1giM

https://www.youtube.com/watch?v=N5gYo43oLE8

https://www.youtube.com/watch?v=hr2X7rmkprM