0

How can I download a data file from a website into RStudio using ubuntu 17.10?

I am using the command below, but I get an error:

unexpected / and unexpected "
cpd <- read.csv(url(“https://pub.data.gov.bc.ca/datasets/176284/BC_Liquor_Store_Product_Price_list.csv?accessType=DOWNLOAD”))
David Foerster
  • 36,264
  • 56
  • 94
  • 147

1 Answers1

3

Replace the smart quotes

cpd <- read.csv(url(“https://pub.data.gov.bc.ca/datasets/176284/BC_Liquor_Store_Product_Price_list.csv?accessType=DOWNLOAD”))

with regular ASCII double quotes:

cpd <- read.csv(url("https://pub.data.gov.bc.ca/datasets/176284/BC_Liquor_Store_Product_Price_list.csv?accessType=DOWNLOAD"))
steeldriver
  • 136,215
  • 21
  • 243
  • 336