My 7zip is installed on a server under /programs/7zip/7zz , rather than in ~/usr/bin/7z or other path files indicated in has_7z . Is there a way to point R to the proper 7z, or should it be an alteration of your has_7z script such as:
has_7z <- function(string) { # This would need to be modified so that an empty path wouldn't break the script
paths_7z <- c("7z",
path.expand("~/usr/bin/7z"),
string,
"C:\\PROGRA~1\\7-Zip\\7za",
"C:\\PROGRA~1\\7-Zip\\7z.exe")
if (!any(nchar(Sys.which(paths_7z)) > 0)) {
list(yes = FALSE, path = NA)
} else {
list(yes = TRUE, path = paths_7z[nchar(Sys.which(paths_7z)) > 0][1])
}
}
has_7z('/programs/7zip/7zz')