r data munging script + sample data