Exercise

Secure importing

In the previous exercises, you have been working with URLs that all start with http://. There is, however, a safer alternative to HTTP, namely HTTPS, which stands for HyperText Transfer Protocol Secure. Just remember this: HTTPS is relatively safe, HTTP is not.

Luckily for us, you can use the standard importing functions with https:// connections since R version 3.2.2.

Instructions

100 XP
  • Take a look at the URL in url_csv. It uses a secure connection, https://.
  • Use read.csv() to import the file at url_csv. The .csv file it is referring to contains column names in the first row. Call it pools1.
  • Load the readr package. It's already installed on DataCamp's servers.
  • Use read_csv() to read in the same .csv file in url_csv. Call it pools2.
  • Print out the structure of pools1 and pools2. Looks like the importing went equally well as with a normal http connection!