Get the package name from a GitHub repo/package@branch
string
ghPkgName(x)
character vector of package names
a named character vector
pkgs <- c("dplyr", "PredictiveEcology/pemisc", "PredictiveEcology/SpaDES.core@development")
ghPkgName(pkgs) ## "dplyr" "pemisc" "SpaDES.core"
#> dplyr
#> "dplyr"
#> PredictiveEcology/pemisc
#> "pemisc"
#> PredictiveEcology/SpaDES.core@development
#> "SpaDES.core"