From 75868035a6e363c2ad67ff0342440aff3972a970 Mon Sep 17 00:00:00 2001 From: Ben Green Date: Sun, 4 Oct 2015 17:18:05 -0400 Subject: .. --- R Scripts/arrest-vs-infection-times.R | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'R Scripts/arrest-vs-infection-times.R') 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))) -- cgit v1.2.3-70-g09d2