Update corr.R

Fixed aggregation to be on filtered dataset instead of unfiltered