available
available copied to clipboard
How do you determine which GitHub package uses name
I love the package, but find it hard to find which overlaps exist. For example, I wanted to make sure the name adept
wasn't taken, and I searched and found it on GitHub (it's the package I was working on). But to find the link to the GitHub, I needed to know which slot github
was. Is there an accessor function or should I send a PR with named list elements for output of available
?
res = available::available("adept", browse = FALSE)
#> Warning: 'BiocInstaller' and 'biocLite()' are deprecated, use the 'BiocManager'
#> CRAN package instead.
res[[4]]
#> Available on GitHub: ✖
names(res)
#> NULL
slotNames(res)
#> character(0)
names(res[[4]])
#> [1] "available" "close"
unlist(res[[4]])
#> available
#> "FALSE"
#> close.pkg_name
#> "adept"
#> close.title
#> "Adaptive Empirical Pattern Transformation "
#> close.url
#> "https://github.com/martakarass/adept"
#> close.pkg_location
#> "martakarass/adept"
#> close.pkg_org
#> "martakarass"
#> close.distance
#> "0"
Created on 2019-02-28 by the reprex package (v0.2.1)
It uses an API that crawls GitHub https://github.com/ropenscilabs/available/blob/57c04c32f14ade8eb72b568a434dbbe36c3c9365/R/github.R#L32
http://rpkg.gepuro.net / http://rpkg-api.gepuro.net
I don't know what heuristics it uses, likely just GItHub's repository types, so your package will likely be added to the list at some point soon.
Sorry if I wasn't clear - how do you extract which repo it found on GitHub from the object returned from available::available
in R
? Can you extract elements from the output list object/available_query
object?
I guess we could have a github_locations()
function to pull this out, or possibly the default print method should just print the first few found by default.
You could say the number of github matches next to the cross? Would you like someone to work on a github_locations() function to print this out? I'm available (no pun intended).