Download a file from HTTPS using download.file()

后端 未结 9 1611
庸人自扰
庸人自扰 2020-11-28 07:38

I would like to read online data to R using download.file() as shown below.

URL <- \"https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fs         


        
9条回答
  •  情歌与酒
    2020-11-28 08:12

    I've succeed with the following code:

    url = "http://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv"
    x = read.csv(file=url)
    

    Note that I've changed the protocol from https to http, since the first one doesn't seem to be supported in R.

提交回复
热议问题