safety_summary function

Calculate frequency tables from a rectangular data frame with one row per subject-event