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

Getting keys

You can also get and set the keys programmatically. In this exercise, only one of netflix and imdb has their key set. Your job is to find out which data.table has had their key set, then use that to set the key for the other data.table.

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

Joining Data with data.table in R

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

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

  • Check whether netflix and imdb have had any key set.
  • Assign the key of the data.table which has a key to the_key.
  • Set the key of the other data.table using the_key.

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

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

# Check for keys
___
___

# Find the key
the_key <- ___

# Set the key for the other data.table
___(___, ___)
Редактировать и запускать код