working through analyzing baseball data with R examples