Import Excel files from the web
When working with multiple data sources, .xls is a common format for storage and exchange. You have been provided with a URL which you'll be using to download and import a .xls file. The URL is already available in the sample code. Once downloaded, you will import the file using readxl and inspect its content.
Diese Übung ist Teil des Kurses
Intermediate Importing Data in R
Anleitung zur Übung
- Load the
readxlpackage. It is already installed on DataCamp's servers. - Use
download.file()to download the.xlsfile behind the URL and store it locally as"local_latitude.xls". - Import the
.xlsfile located at the URLurl_xlsusingread_excel(). Store the resulting data frame asexcel_readxl.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Load the readxl package
# Specification of url: url_xls
url_xls <- "https://assets.datacamp.com/production/course_1478/datasets/latitude.xls"
# Download file behind URL, name it local_latitude.xls
# Import the local .xls file