I can not get this working with my R code.
I am trying to remove all blank spaces and NA values from the column Weapon.Description in the crimeData dataset. Then print out the head of the column (minus the blanks and NAs).
Here is my current code although it doesn't remove blanks for some reason:
crimeData[!(!is.na(crimeData$Weapon.Description) &
crimeData$Weapon.Description==""), ]
head(crimeData$Weapon.Description)
[1] STRONG-ARM (HANDS, FIST, FEET OR BODILY FORCE)
[2]
[3]
[4]
[5]STRONG-ARM (HANDS, FIST, FEET OR BODILY FORCE)