Skip to content

Commit

Permalink
Remove code no longer used by devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
jimhester committed Oct 17, 2018
1 parent 66010e1 commit 6b28a5d
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions R/cran.R
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
available_packages <- memoise::memoise(function(repos, type) {
available.packages(contrib.url(repos, type), type = type)
})

package_url <- function(package, repos,
available = available_packages(repos, "source")) {
ok <- (available[, "Package"] == package)
ok <- ok & !is.na(ok)

if (!any(ok)) {
return(list(name = NA_character_, url = NA_character_))
}

vers <- package_version(available[ok, "Version"])
keep <- vers == max(vers)
keep[duplicated(keep)] <- FALSE
ok[ok][!keep] <- FALSE

name <- paste(package, "_", available[ok, "Version"], ".tar.gz", sep = "")
url <- file.path(available[ok, "Repository"], name)

list(name = name, url = url)
}


# Return the version of a package on CRAN (or other repository)
# @param package The name of the package.
# @param available A matrix of information about packages.
Expand Down

0 comments on commit 6b28a5d

Please sign in to comment.