title: Use R to mimic clicking 'Download dataset' and save file in a different folder
body: <p>I am hoping someone would be able to help me figure out how to scrape a .csv file that does not have a link.</p>
  <p><strong>Clicking the Download button in R</strong></p>
  <p>I would like to have R download the .csv file that is generated when clicking the 'Download dataset' next to the first table on this website <a href="https://www.opentable.com/state-of-industry" rel="nofollow noreferrer">https://www.opentable.com/state-of-industry</a>. The closest post I found to my problem is <a href="https://stackoverflow.com/questions/56930246/using-r-to-mimic-clicking-a-download-file-button-on-a-webpage">this</a>, but I cannot find the API link that is used in the solution.</p>
  <p><strong>Potential Second Question: Saving the downloaded file to another location</strong></p>
  <p>Ideally, I would like the file to be loaded in R (similar to what the solution in the link above does), but if the only way is to download it on my device and then read it in R, then I would like the .csv file to be installed in a specific folder (e.g. C:\Documents\OpenTable) and overwrite the existing file with the same name.</p>
  <p>Thanks!</p>