Skip to content

Instantly share code, notes, and snippets.

@duxan
Created June 20, 2015 12:21
Show Gist options
  • Save duxan/2cd638e0a026300977c6 to your computer and use it in GitHub Desktop.
Save duxan/2cd638e0a026300977c6 to your computer and use it in GitHub Desktop.
# 1. set WD
setwd("C:/Users/Core-i5/Desktop/dataSci/3 Getting data/W3") # NOTE: change this PATH
# 2. make folder
if(!file.exists("./data")){
dir.create("./data")
}
# 3. make handle
fileURL <- "https://github.com/DataScienceSpecialization/courses/blob/master/03_GettingData/dplyr/chicago.rds?raw=true"
# 4. download data
download.file(fileURL, destfile = "./data/chicago.rds", method = "curl", extra='-L')
# 5. read data
chicago <- readRDS("./data/chicago.rds")
@derderi
Copy link

derderi commented Jun 24, 2016

Thanks ,duxan
Yes,when using the
http://stackoverflow.com/questions/29814405/why-do-i-need-to-use-mode-wb-with-download-file-for-this-rds-file
it gives the right data ,and we can manipulate the Data with dplyr nicely and smoothly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment