title: Download file with R given a JavaScript Statement
body: <p>I want to create an R script that, among other things, downloads baseball player projection data from <a href="http://www.fangraphs.com/projections.aspx?pos=all&amp;stats=bat&amp;type=zips" rel="noreferrer">http://www.fangraphs.com/projections.aspx?pos=all&amp;stats=bat&amp;type=zips</a>.  There is a link to export this data to .csv on the webpage near the top right corner of the data table but it appears to be a JavaScript command (javascript:__doPostBack('ProjectionBoard1$cmdCSV','').  I am familiar with using <code>download.file()</code> using a link to a .csv file but am not sure how to approach this.</p>
  
  <p>How can I use R to extract this data?</p>