Here are three related examples for using R to analyze urban crime using basic spatial statistics. The data and code are in the included in the .zip file.
Working With Geographic Shapefiles in R
Application: Analyzing Milwaukee Crime Data in R
Applying Basic Spatial Statistics to Crime Data in R
More information is available at www.scotthegerty.com.