1

Completely new to R (being introduced to it in a class right now).

I'm having some issues just getting my data to read in. I'm sourcing it from a webpage: (ftp://webftp.vancouver.ca/opendata/csv/crime_2004.csv) and putting both the URL and the file path if I download the .csv file is giving me the following error message:

"Error in open.connection(file, "rt") : 
  URL using bad/illegal format or missing URL"

My code:

fname = curl("/Users/shane_1001/Downloads/crime_2004.csv")
data = read.csv(fname, header=T)
print(head(data))
Zulu
  • 8,765
  • 9
  • 49
  • 56
shaneg1991
  • 23
  • 5
  • I would say you should put the ftp-link into curl and not a path to your diskdrive. Or if you need to address the file locally you should create a file:// -link – Marged Oct 18 '15 at 23:06
  • Thanks for the reply! I tried that too but it's giving me a similar error message: Error in open.connection(file, "rt") : FTP: couldn't retrieve (RETR failed) the specified file – shaneg1991 Oct 18 '15 at 23:09
  • Tried the search ? http://stackoverflow.com/questions/13265153/how-to-import-a-csv-file – Marged Oct 18 '15 at 23:10

0 Answers0