我想从位于https://gitlab.aau.at/agebhard/interpinterp
的 Gitlab 存储库中的“样条线”分支安装包。当我在网页上选择该分支时,URL 更改为https://gitlab.aau.at/agebhard/interp/-/tree/spline。但是,以明显的方式使用该 URL 会产生错误:
remotes::install_gitlab("agebhard/interp",
subdir = "-/tree/spline",
host = "https://gitlab.aau.at")
#> Error: Failed to install 'unknown package' from GitLab:
#> cannot open URL 'https://gitlab.aau.at/api/v4/projects/agebhard%2Finterp/repository/files/-%2Ftree%2Fspline%2FDESCRIPTION/raw?ref=HEAD'
由reprex 包于 2022-02-09 创建(v2.0.1.9000)
我最终克隆了整个存储库,然后使用git branch
选择分支,并在本地安装。但肯定remotes::install_gitlab()
会提供一种直接从分支安装的方法吗?该install_github()
函数必须ref
选择一个分支或标签,但我在install_gitlab()
.