diff options
Diffstat (limited to 'R Scripts/arrest-vs-infection-times.R')
| -rw-r--r-- | R Scripts/arrest-vs-infection-times.R | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/R Scripts/arrest-vs-infection-times.R b/R Scripts/arrest-vs-infection-times.R index 7c0bfcf..4d2a81d 100644 --- a/R Scripts/arrest-vs-infection-times.R +++ b/R Scripts/arrest-vs-infection-times.R @@ -19,11 +19,13 @@ first_arrests = as.numeric(arr$date2) - offset lag = first_vics - first_arrests hist(lag,100,col='') h = hist(lag,150,col='#1f78b4',border=NA,axes=T, - xlab='',ylab='Frequency',main=NULL) + xlab='Days between first arrest and first gunshot victimization', + ylab='Frequency',main=NULL,cex.axis=0.6,cex.lab=0.6) box(lwd=1.1) - - +dobs = as.Date(arr$birth_date,format='%m/%d/%Y') +ages = as.numeric(start_date + first_vics - dobs) +plot(table(round(ages/365))) |
