НачатьНачать бесплатно

Multi-key, single-key

In addition to locations, you will work with the teachers dataset in this exercise. It contains information about the teacher for each subject. The teacher of each subject does not change between semesters. Your goal is to build a new data.table containing the room allocation for each subject, using the teachers and locations data.tables.

Это упражнение является частью курса

Joining Data with data.table in R

Посмотреть курс

Инструкции к упражнению

  • Identify the key column(s) for joining teachers and locations and assign it as a character vector in the form c("teachers_join_key" = "locations_join_key") to the join_key variable.
  • Using the data.table syntax, right join locations to teachers using the join_key variable.

Интерактивное практическое упражнение

Попробуйте выполнить это упражнение, дополнив этот пример кода.

# Identify and set the keys
join_key <- ___

# Right join
___
Редактировать и запускать код