Data Structures in R
In this unit:
- Learn different types of Data Structures in R.
- Perform and execute commands in R.
- Understand vectors and matrices.
- Understand how to perform basic arithmetic (including vectors and matrices) using different operators in R.

R and RStudio Data Activities
Using the Crime Survey for England and Wales, 2013-2014: Unrestricted Access Teaching Dataset (see Unit 1), perform the following activities:
- Explore whether survey respondents experienced any crime in the 12 months prior to the survey using the variable bcsvictim.
- Create a frequency table to count if the survey respondents experienced any crime in the previous 12 months. Use the table() command.
- Assess the results and decide if you need to convert this variable into a factor variable. Use as_factor.
Results shown in image on the left. Because there are only two values, I decided not to convert to a factor variable.