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.
Este ejercicio forma parte del curso
Intermediate Importing Data in R
Instrucciones del ejercicio
- Take a look at the URL in
url_csv. It uses a secure connection,https://. - Use
read.csv()to import the file aturl_csv. The.csvfile it is referring to contains column names in the first row. Call itpools1. - Load the
readrpackage. It's already installed on DataCamp's servers. - Use
read_csv()to read in the same.csvfile inurl_csv. Call itpools2. - Print out the structure of
pools1andpools2. Looks like the importing went equally well as with a normalhttpconnection!
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# https URL to the swimming_pools csv file.
url_csv <- "https://assets.datacamp.com/production/course_1478/datasets/swimming_pools.csv"
# Import the file using read.csv(): pools1
# Load the readr package
# Import the file using read_csv(): pools2
# Print the structure of pools1 and pools2