在R中安装scale

3

我尝试通过以下方式在R中安装scale:

devtools::install_github("scale",username="hadley/scale")

但是,
Downloading github repo hadley/scale/scale@master
Error in download(dest, src, auth) : client error: (404) Not Found
In addition: Warning message:
Username parameter is deprecated. Please use hadley/scale/scale

4
应该使用 devtools::install_github("hadley/scales"),其中有s,表示比例尺。 - user3710546
2
请注意,最新版本的scales软件包(v0.2.5)现在也已经上线CRAN。因此,您可以尝试使用install.packages("scales")进行安装。 - RHertel
1个回答

3
  1. install_github函数的一般语法如下:

install_github(repo)

其中,repo的格式为"用户名/仓库名"

  1. 应检查用户名仓库名的语法,以避免出现以下错误信息:

Error in download(dest, src, auth) : client error: (404) Not Found

  1. 在比较GitHub和CRAN上可用的版本时,也是一个好习惯。如果存在相同的版本,则最简单的方法是:

install.packages(pkgname, dependencies = TRUE) # pkgname需要用引号括起来

其中,dependencies参数确保安装所有与pkg相关的包,包括依赖、链接、导入和建议的包。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接