Name: Hanh Phuong Nguyen

Student Number: 301354425

Use this template for your ECON 334 R assignments. Replace this line and everything below with your answers to the assigned questions. Remember that you can paste R code chunks between these delimiters:

Question 1

friends <- c("Tracy","Tina","Lucy")
friends
## [1] "Tracy" "Tina"  "Lucy"
ages <- c(23,22,23)
ages
## [1] 23 22 23

b.1

friends <- c("Tracy","Tina","Lucy")
friends
ages <- c(23,22,23)
ages

This option combines two objects (friends and ages) into one library and remove the ##Attaching packages when I knit the file.

b.2

This options doesn’t load the output so this part of the knitted file is blank.

b.3

## [1] "Tracy" "Tina"  "Lucy"
## [1] 23 22 23

This option only shows the #Attaching packages in the knitted file.

Question 2

a.Example of bad data visualization

The Economist, Why ticket prices on long-haul flights have plummeted

Link of source: https://rigorousthemes.com/blog/bad-data-visualization-examples/

Reasons why my image is not a good data visualization:

b.Example of good data visualization

Google Analytics Dashboard

Link of source: https://www.oneclickitsolution.com/blog/data-visualization-examples/

Reasons why my image is a good data visualization: