1. Learn
  2. /
  3. Courses
  4. /
  5. Joining Data with data.table in R

Connected

Exercise

Multi-column keys

Two new datasets are available in your R session:

  • subjects: contains the subject each student is taking each semester this year
  • locations: contains the room allocations for each subject

Your goal is to build a new data.table with the locations of each subject for each student.

Instructions 1/3

undefined XP
    1
    2
    3

Right join locations to subjects using the "subject" and "semester" columns in both data.tables as two separate join key columns. You should get an error.