Reputation: 51
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'"))
Upvotes: 0
Views: 377