教材要求安装SIT,也就是“系统投资者工具箱”Systematic Investor Toolbox (SIT) 。
我很自然的使用CRAN安装SIT
> install.packages("SIT")
Warning in install.packages :
package ‘SIT’ is not available (for R version 3.6.2)
> install.packages('curl', repos = 'http://cran.r-project.org')
Error in install.packages : Updating loaded packages
伤心了居然不能自动安装。
我看了一下官网的安装说明。似乎不难。但是,我有一个感觉只要是不能CRAN安装的包,总会遇到一些问题,比如外网问题。很烦人。
安装 curl和devtools
> install.packages("curl", repos = "http://cran.r-project.org")
trying URL 'http://cran.r-project.org/bin/windows/contrib/3.6/curl_4.3.zip'
Content type 'application/zip' length 4129433 bytes (3.9 MB)
downloaded 3.9 MB
package ‘curl’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\chang\AppData\Local\Temp\Rtmp0mIBQf\downloaded_packages
> devtools::install_github('systematicinvestor/SIT.date')
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 systematicinvestor/SIT.date@master
These packages have more recent versions available.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: stringi (1.4.4 -> 1.4.5) [CRAN]
5: zoo (1.8-6 -> 1.8-7) [CRAN]
Enter one or more numbers, or an empty line to skip updates:
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\chang\AppData\Local\Temp\Rtmp0mIBQf\remotes3b0c253912c1\systematicinvestor-SIT.date-2713207/DESCRIPTION' ...
- preparing 'SIT.date':
√ checking DESCRIPTION meta-information ...
- checking for LF line-endings in source and make files and shell scri