I have created a code that downloads .zip
file to my computer memory and then extracts .csv
file from the .zip. However, I do not want to save .zip
file to my computer. Instead, I would like to directly download .csv
file to my working environment. Are there any other solutions to do so?
temp <- tempfile()
download.file("ftp://usr:pwd@ftp.XXXX.com//Folder1/Folder2/file.zip",temp)
df <- read.csv(unz(temp, "my_csv.csv"), header = TRUE, sep = ",")
unlink(temp)