-1

I would like to read a URL (csv file) online in R but my code does not work

test = read.csv('https://s3.amazonaws.com/folder/abcd/file.csv')

Here is the error: Error in file(file, "rt") : for https:// URLs use setInternet2(TRUE)

I have no idea how to fix this.Really appreciate any help

Square9627
  • 869
  • 3
  • 10
  • 15

1 Answers1

0

The error message suggests a network constraint (e.g., you are attempting to access the AWS S3 bucket from your work location...but the SysAdmins have locked that protocol/port/etc. down).

If you are attempting to download a specific file, then you could download the file outside of R (say, using cURL), save it on your hard drive, then modify read.csv to access the file from your workstation.

If you need to [programmatically] access multiple files for download, then it's to your advantage to research 'setInternet2' (an MS-Windows DLL) AND existence of any network access limitations imposed by your organization's SysAdmins.

Plane Wryter
  • 1,299
  • 1
  • 11
  • 14