Update all packages from GitHub

后端 未结 3 1065
暖寄归人
暖寄归人 2021-01-31 19:00

I know you can install packages from CRAN with this syntax:

install.packages(c(\"Rcpp\"), dependencies=TRUE)

You can update all of them from CR

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-31 19:10

    2019 update:

    The function update_packages() from the package remotes (one of the "offspring" of devtools) now does a great job at updating packages from CRAN, GitHub, etc.

    You might want to set some environment variables to make it work smoothly for you. The README of the package on GitHub gives their list. In my case, this is what I have:

    R_REMOTES_UPGRADE=always
    R_REMOTES_NO_ERRORS_FROM_WARNINGS=true
    GITHUB_PAT=
    

    Once set, all you have to do is:

    remotes::update_packages()
    

    to update all your packages.

提交回复
热议问题