简单记录,没太大参考价值,我也不清楚怎么安装好了。一开始安装ggord老报错。总结一下用到的代码:
> devtools::install_github('fawda123/ggord')
> install_github('fawda123/ggord')
> install.packages("C:/Users/江**/Downloads/ggord-master.zip", repos = NULL, type = "win.binary") ### 本地安装
> library(ggord)
> install.packages("installr")
> install.packages("stringr")
> library(stringr)
> library(installr)
> install.Rtools() ### Rtools安装
> devtools::install_github('fawda123/ggord')
> library(ggord)
> ?ggord
具体运行过程:
devtools安装ggord
> devtools::install_github('fawda123/ggord')
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools custom from http://cran.r-project.org/bin/windows/Rtools/.
Downloading GitHub repo fawda123/ggord@master
fawda123-ggord-d385bab/README_files/bootstrap-3.3.1/css/cosmo.min.css: truncated gzip input
tar.exe: Error exit delayed from previous errors.
错误: Failed to install 'ggord' from GitHub:
Does not appear to be an R package (no DESCRIPTION)
此外: Warning messages:
1: In utils::untar(tarfile, ...) :
‘tar.exe -xf "C:\Users\江*\AppData\Local\TEMP_~1\Rtmpqkm4kS\filec80c22767359.tar.gz" -C "C:/Users/江*/AppData/Local/TEMP_~1/Rtmpqkm4kS/remotesc80c6cd92f9e"’ returned error code 1
2: In system(cmd, intern = TRUE) :
运行命令'tar.exe -tf "C:\Users\姹熷ぉ鏄嶾AppData\Local\TEMP_~1\Rtmpqkm4kS\filec80c22767359.tar.gz"'的状态是1
> install_github('fawda123/ggord')
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools custom from http://cran.r-project.org/bin/windows/Rtools/.
Downloading GitHub repo fawda123/ggord@master
fawda123-ggord-d385bab/README_files/bootstrap-3.3.1/css/bootstrap.css: truncated gzip input
tar.exe: Error exit delayed from previous errors.
错误: Failed to install 'ggord' from GitHub:
Does not appear to be an R package (no DESCRIPTION)
此外: Warning messages:
1: In utils::untar(tarfile, ...) :
‘tar.exe -xf "C:\Users\江*\AppData\Local\TEMP_~1\Rtmpqkm4kS\filec80c7d92326d.tar.gz" -C "C:/Users/江*/AppData/Local/TEMP_~1/Rtmpqkm4kS/remotesc80c65df7e49"’ returned error code 1
2: In system(cmd, intern = TRUE) :
运行命令'tar.exe -tf "C:\Users\姹熷ぉ鏄嶾AppData\Local\TEMP_~1\Rtmpqkm4kS\filec80c7d92326d.tar.gz"'的状态是1
尝试devtools本地安装,在github下载好压缩包,Rstudio安装
> install.packages("C:/Users/江*/Downloads/ggord-master.zip", repos = NULL, type = "win.binary")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
本地安装也失败,根据报错猜想是Rtools没安装,但只是WARNING,不管怎样先试一下吧。在CRAN下载exe安装要添加环境变量很麻烦,看到有个简单的教程,RStudio安装Rtools:https://blog.csdn.net/yangli2852/article/details/95635373
> library(ggord)
Error in library(ggord) : 不存在叫‘ggord’这个名字的程辑包
> install.packages("installr")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
试开URL’https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.6/installr_0.22.0.zip'
Content type 'application/zip' length 342728 bytes (334 KB)
downloaded 334 KB
package ‘installr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\江*\AppData\Local\Temp;\Rtmpqkm4kS\downloaded_packages
> install.packages("stringr")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
试开URL’https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.6/stringr_1.4.0.zip'
Content type 'application/zip' length 216753 bytes (211 KB)
downloaded 211 KB
package ‘stringr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\江*\AppData\Local\Temp;\Rtmpqkm4kS\downloaded_packages
> library(stringr)
> library(installr)
Welcome to installr version 0.22.0
More information is available on the installr project website:
https://github.com/talgalili/installr/
Contact: <tal.galili@gmail.com>
Suggestions and bug-reports can be submitted at: https://github.com/talgalili/installr/issues
To suppress this message use:
suppressPackageStartupMessages(library(installr))
> library(installr)
> install.Rtools()
Loading required package: htmltab
also installing the dependency ‘XML’
试开URL’https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.6/XML_3.99-0.3.zip'
Content type 'application/zip' length 4255589 bytes (4.1 MB)
downloaded 4.1 MB
试开URL’https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.6/htmltab_0.7.1.1.zip'
Content type 'application/zip' length 100967 bytes (98 KB)
downloaded 98 KB
package ‘XML’ successfully unpacked and MD5 sums checked
package ‘htmltab’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\江*\AppData\Local\Temp;\Rtmpqkm4kS\downloaded_packages
Loading required package: htmltab
No encoding supplied: defaulting to UTF-8.
Argument 'which' was left unspecified. Choosing first table.
错误: Couldn't find a table.
Rtools估计没安装成功,再试试ggord吧
> devtools::install_github('fawda123/ggord')
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools custom from http://cran.r-project.org/bin/windows/Rtools/.
Downloading GitHub repo fawda123/ggord@master
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: Rcpp (1.0.4 -> 1.0.4.6) [CRAN]
5: withr (2.1.2 -> 2.2.0 ) [CRAN]
6: pkgbuild (1.0.6 -> 1.0.7 ) [CRAN]
7: isoband (0.2.0 -> 0.2.1 ) [CRAN]
8: tibble (3.0.0 -> 3.0.1 ) [CRAN]
Enter one or more numbers, or an empty line to skip updates:
a = USJudgeRatings
Enter one or more numbers, or an empty line to skip updates:
1
Rcpp (1.0.4 -> 1.0.4.6) [CRAN]
withr (2.1.2 -> 2.2.0 ) [CRAN]
pkgbuild (1.0.6 -> 1.0.7 ) [CRAN]
isoband (0.2.0 -> 0.2.1 ) [CRAN]
tibble (3.0.0 -> 3.0.1 ) [CRAN]
Installing 5 packages: Rcpp, withr, pkgbuild, isoband, tibble
试开URL’https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.6/Rcpp_1.0.4.6.zip'
Content type 'application/zip' length 3030990 bytes (2.9 MB)
downloaded 2.9 MB
试开URL’https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.6/withr_2.2.0.zip'
Content type 'application/zip' length 206792 bytes (201 KB)
downloaded 201 KB
试开URL’https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.6/pkgbuild_1.0.7.zip'
Content type 'application/zip' length 136004 bytes (132 KB)
downloaded 132 KB
试开URL’https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.6/isoband_0.2.1.zip'
Content type 'application/zip' length 3304543 bytes (3.2 MB)
downloaded 3.2 MB
试开URL’https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.6/tibble_3.0.1.zip'
Content type 'application/zip' length 411838 bytes (402 KB)
downloaded 402 KB
package ‘Rcpp’ successfully unpacked and MD5 sums checked
package ‘withr’ successfully unpacked and MD5 sums checked
package ‘pkgbuild’ successfully unpacked and MD5 sums checked
package ‘isoband’ successfully unpacked and MD5 sums checked
package ‘tibble’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\江*\AppData\Local\Temp;\Rtmpqkm4kS\downloaded_packages
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools custom from http://cran.r-project.org/bin/windows/Rtools/.
√ checking for file 'C:\Users\江*\AppData\Local\Temp;\Rtmpqkm4kS\remotesc80c4471fe4\fawda123-ggord-d385bab/DESCRIPTION'
- preparing 'ggord': (442ms)
√ checking DESCRIPTION meta-information ...
Warning in .write_description(db, ldpath) :
没有这样带非ASCII数据的编码: 转换为ASCII
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'ggord_1.1.4.tar.gz'
* installing *source* package 'ggord' ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'ggord'
finding HTML links ... 好了
ggord html
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (ggord)
竟然,好了??
跑了一下Examples,行的。

网友评论