Download files over HTTPS in R with httr

To download a file over HTTP connection, we normally use download.file command in R, for example:

url = ""
download.file(url, "iris.csv", quiet=TRUE)

For HTTPS connections, download.file may give you some issues. In situations like this you can consider using the httr package to download files:

url <- ""
GET(url, write_disk("iris.xlsx", overwrite=TRUE))