analyzing parts data in R