Extract GitHub user and repo name from GitHub URL
githubURLParts(urls)character() A vector of URLs
A data.frame with four columns:
url: The original GitHub URL
user_repo: The GitHub "username/repo", combined
user: The GitHub username
repo: The GitHub repo name
# find GitHub URL details for
# Bioconductor packages
bpkgl = biocPkgList()
#> 'getOption("repos")' replaces Bioconductor standard repositories, see
#> 'help("repositories", package = "BiocManager")' for details.
#> Replacement repositories:
#> CRAN: https://cran.rstudio.com
urldetails = githubURLParts(bpkgl$URL)
urldetails = urldetails[!is.na(urldetails$url),]
head(urldetails)
#> url user_repo
#> 8 https://github.com/malhamdoosh/abseqR malhamdoosh/abseqR
#> 11 https://github.com/tgac-vumc/ACE tgac-vumc/ACE
#> 13 https://github.com/seandavi/ACME seandavi/ACME
#> 14 https://github.com/rdiaz02/adacgh2 rdiaz02/adacgh2
#> 22 https://github.com/xyz1396/Aerith xyz1396/Aerith
#> 24 https://github.com/HenrikBengtsson/affxparser HenrikBengtsson/affxparser
#> user repo
#> 8 malhamdoosh abseqR
#> 11 tgac-vumc ACE
#> 13 seandavi ACME
#> 14 rdiaz02 adacgh2
#> 22 xyz1396 Aerith
#> 24 HenrikBengtsson affxparser