最近從GitHub安裝R包時(shí)經(jīng)常會報(bào)錯:
>remotes::install_github("califano-lab/PISCES")
Downloading GitHub repo califano-lab/PISCES@HEADError in utils::download.file(url, path, method = method, quiet = quiet, :
download from 'https://api.github.com/repos/califano-lab/PISCES/tarball/HEAD' failed`
在網(wǎng)上查找后發(fā)現(xiàn)好像是從GitHub安裝R包經(jīng)常會出現(xiàn)的問題,與代碼無關(guān)。并且很多時(shí)候過一段時(shí)間再安裝挚币,報(bào)錯就會消失。但盡管如此丐箩,還是會影響跑代碼的效率,因此我也找了一個備選的安裝方法,記錄一下:
從GitHub直接安裝R包的zip文件
install.packages('<ZIP path>', repos = NULL, type = "source")