✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
The following question is about tidy data. The table below contains looks at crime occurrence in different locations across Victoria:
entry_point | Location | crime_type | count |
---|---|---|---|
FRONT DOOR | Oakleigh | violent | 67 |
FRONT DOOR | Clayton | violent | 53 |
WINDOW | Oakleigh | burglary | NA |
WINDOW | Clayton | burglary | 6 |
Roof | Oakleigh | Others | 17 |
Roof | Clayton | Others | 22 |
If you would like to calculate the proportion of the different crime types by location which code do you need to use?
Hint: Missing values is typically denoted by "NA" in the dataset, we can ignore these values by passing the option "na.rm = TRUE" to the appropriate R command.
Incorrect answers will be penalised.
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!