'use read_sas to read specific file under a zipped file in R

I have a zipped sas file and there are couple sas files inside that. Just want to know if there is a chance that I can use read_sas function to read specific file under that zipped file? Couldn't find anything online about that.

Checked the ?read_sas nothing mentioned about that.

code I used :

# zipped file name: example.zip
# files inside example.zip file are file1.sas7bdat, file2.sas7bdat and targetfilename.sas7bdat
file <- read_sas(example.zip, 'targetfilename.sas7bdat')

outcome: read_sas only read the first file inside that zipped file.

Sorted solution:

 read_sas(unz("examp;e.zip", "'targetfilename.sas7bdat'"))
r


Solution 1:[1]

solved:

   read_sas(unz("examp;e.zip", "'targetfilename.sas7bdat'"))

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 J.ZHONG