-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a 'removePackages' function to easily remove packages from the miniCRAN repo #81
Comments
Please provide more information about the specific nature of your request. For example:
The workaround is simple:
Pull requests welcome. |
A use case may happen for instance when one package inside a miniCRAN repo is accepted on CRAN. Would you consider the following function as a good candidate for a pull request - up to dependencies or reverse dependencies management? (In the end it would better be called deletePackage <- function(pkgs = NULL, path = NULL, type = "source", Rversion = R.version) {
a <- pkgAvail(repos=path, type = type, Rversion = Rversion)
w <- which(a[,"Package"] %in% pkgs)
ext <- switch(type, source = ".tar.gz", mac.binary = ".tgz", win.binary = ".zip")
pkgs <- paste(a[w,"Package"], "_", a[w,"Version"], ext, sep = "")
unlink(file.path(path, repoPrefix(type = type, Rversion = R.version), pkgs))
updateRepoIndex(path, type = type, Rversion = Rversion)
invisible(pkgs)
} |
@paulponcet the function you are proposing should be vectorized to handle multiple package types, the way |
@achubaty Came across this issue looking for the same "remove package" functionality. Would you still be interested in adding that if I vectorize the code above and send a PR? |
@tonytonov Vectorizing the code is a good start but Andrie's points above still hold. For me, I would want unused dependencies to also be removed. PRs welcome! |
No description provided.
The text was updated successfully, but these errors were encountered: