Monday, 15 July 2013

Error using download.file for web data on PC -



Error using download.file for web data on PC -

my code:

url <- "http://dl.dropboxusercontent.com/u/26929842/ug_sch_apps.csv"

download.file(url, destfile = "./ug_sch_apps.csv", method="curl")

list.files( "./ug_sch_apps.csv") download_date=date()

ug_sch_apps <- read.csv("./data/ug_sch_apps.csv" , stringsasfactors=f)

my error received:

error in file(file, "rt") : cannot open connection in addition: warning message: in file(file, "rt") : cannot open file './data/ug_sch_apps.csv': no such file or directory

it appears you've forgotten s in https://

and

use these code:

url <- "https://dl.dropboxusercontent.com/u/26929842/ug_sch_apps.csv"

download.file(url, destfile = "./data/ug_sch_apps.csv", method="curl")

ug_sch_apps <- read.csv("./data/ug_sch_apps.csv" , stringsasfactors=f)

download

No comments:

Post a Comment