Skip to content

7zip is stored in directory not indicated by nhdR:::has_7zip #94

@LZarri

Description

@LZarri

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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions