Trends in run scoring – comparing the leagues

August 10, 2012

(This article was first published on Bayes Ball, and kindly contributed to R-bloggers)

My previous two posts have looked a using R to create trend lines for the run scoring environments in the American and National leagues.  This time around, I'll plot the two against each other to allow for some comparisons.

(The code below assumes that you've read the data into your workspace and calculated the LOESS trend lines, as I did in the previous two posts.)

One of the things I quickly appreciated about the R environment is the option to quickly compare and manipulate (for example, multiply) data from two different source files without having to cut-and-paste the data together.  For everything in this post, we've got two data tables (one for each league) and they remain separate.

Read more »

To leave a comment for the author, please follow the link and comment on their blog: Bayes Ball. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)