To download, extract, and import a zipped data file in R, you can do the following:
Create a temporary file to store the file to be downloaded:
temp <- tempfile()
Download the file from the url:
download.file("file url",temp)
To extract the file from temp file and read the data using read.table:
data <- read.table(unz(temp, "file1.dat"))
Remove the temporary file:
unlink(temp)