New data added to existing data frame

Please look at the homework policy for RStudio Community:

FAQ: Homework Policy

  1. Never copy-paste instructions from an assignment (even for online courses).

Posting an exam question especially is really inappropriate.