I'm using this LA area crime dataset in R. http://catalog.data.gov/dataset/crimes-2012-2015/resource/a2369c45-fcdb-4819-b3fc-979c7b737aed I'm trying to separate the crime "Burglary" from the rest of the crimes in the column named CrmCd.Desc. Here is my code so far:
crime_data <- read.csv('/Users/my_user_name/Downloads/Crimes_2012-2015.csv')
View(crime_data)
crime_data$CrmCd.Desc
I tried this:
burg <- crime_data$CrmCd.Desc['Burglary']
And it showed me this which is not what I'm looking for.
[1] <NA>
158 Levels: ABORTION/ILLEGAL ARSON ... WEAPONS POSSESSION/BOMBING
This shows the entire column of CrmCd.Desc. How do I just show the rows that contain "Burglary" within this column? Thanks