-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Eg, to read tar.gz
fread_targz = function(fp, zp = "C:/Program Files/7-Zip/7z"){
# only tested on windows
# fp should be the path to mycsv.tar.gz
# zp should be the path to 7z.exe
# thanks to Joachim Sauer: https://superuser.com/a/1283392/
qzp = shQuote(zp)
qfp = shQuote(fp)
patt = "%s x -so %%s | %1$s x -si -so -ttar"
thecall = patt %>% sprintf(qzp) %>% sprintf(qfp)
cat("The call:", thecall, sep="\n")
fread(thecall)
}
fread_targz("C:/Users/ferickson/Downloads/mycsv.tar.gz")
Fits ahead of "Tables > Input and output > Reading and writing other formats".
Metadata
Metadata
Assignees
Labels
No labels