title: How to determine if you have an internet connection in R
body: <p>Sometimes I need to download data from the internet. On occasions this has failed either because the website is down or because my computer has lost its internet connection. </p>
  
  <p>Question: Is there some function in R which will return TRUE/FALSE as to whether I am connected to the internet?</p>