Please download the answer file and edit it on Rstudio. Write your student number in the correct place at the beginning of the answer file. When you finish, send the answers.R file to the answers’ mailbox. All questions are independent and can be answered in any order.

  1. Download the file midterm.txt, store it in your computer, and read it into a data frame called midterm. Show summary(midterm).
##      Grade       Num_Homework 
##  Min.   : 0.0   Min.   :0.00  
##  1st Qu.:21.0   1st Qu.:0.00  
##  Median :58.0   Median :0.00  
##  Mean   :53.6   Mean   :0.76  
##  3rd Qu.:87.0   3rd Qu.:1.00  
##  Max.   :99.0   Max.   :3.00
# write here
  1. Plot the vector midterm$Grade.
# write here
  1. Change the plot character to a solid bullet.
# write here
  1. Change the color of all points to blue.
# write here
  1. Change the color of each point, depending on midterm$Num_Homework. The result should be like the following image.
# write here
  1. Now each point is red color, and the size depends on the number of homework delivered. The result should be like the following image.
# write here
  1. Change the symbol of each point, depending on the number of homework delivered.
# write here
  1. Now each point should have a solid symbol. These symbols are identified by number 15, 16, 17, and 18.
# write here
  1. Combine everything. Change the plot character, the color, and the symbol size, depending on the number of homework delivered.
# write here
  1. Change the plot symbol by a letter. The vector LETTERS can be useful.
# write here
  1. This time use lines. Draw the following figure. The black line shows the grades, the red line is midterm$Num_Homework*33.
# write here