其他
你只有一个系统,却要在多个平台上测试你的R包
做为开发者,你必须是R CMD check
经常跑的,但你只有一个平台,这就不好搞了,当然你可以用Travis (Linux, macOS) 或 Appveyor (Windows),但是有更好的方法,你根本就不用离开你的R,不管你是那个系统下,你都可以将R CMD check
跑在各种其它的系统上,然后就像在你自己的机器上跑一样,实时看到输出,检查是否那里有问题。
chk <- check_for_cran()
# wait a bit
chk$cran_summary()
#> Updating status...
#> ## Test environments
#> - R-hub fedora-clang-devel (r-devel)
#> - R-hub windows-x86_64-devel (r-devel)
#> - R-hub ubuntu-gcc-release (r-release)
#>
#> ## R CMD check results
#> ❯ On fedora-clang-devel (r-devel), windows-x86_64-devel (r-devel), ubuntu-gcc-release (r-release)
#> checking CRAN incoming feasibility ... NOTE
#> Maintainer: ‘Maëlle Salmon <maelle.salmon@yahoo.se>’
#>
#> New submission
#>
#> The Description field contains
#> <http://http://cran.r-project.org/doc/manuals/r-release/R-exts.html#The-DESCRIPTION-file>
#> Please enclose URLs in angle brackets (<...>).
#>
#> The Date field is over a month old.
#>
#> ❯ On fedora-clang-devel (r-devel), windows-x86_64-devel (r-devel), ubuntu-gcc-release (r-release)
#> checking R code for possible problems ... NOTE
#> .bello: no visible global function definition for ‘tail’
#> Undefined global functions or variables:
#> tail
#> Consider adding
#> importFrom("utils", "tail")
#> to your NAMESPACE file.
#>
#> 0 errors ✔ | 0 warnings ✔ | 2 notes ✖
支持各种平台,已经发行版和开发版的R
name | description | cran-name |
---|---|---|
debian-gcc-devel | Debian Linux, R-devel, GCC | r-devel-linux-x86_64-debian-gcc |
debian-gcc-patched | Debian Linux, R-patched, GCC | r-patched-linux-x86_64 |
debian-gcc-release | Debian Linux, R-release, GCC | r-release-linux-x86_64 |
fedora-clang-devel | Fedora Linux, R-devel, clang, gfortran | r-devel-linux-x86_64-fedora-clang |
fedora-gcc-devel | Fedora Linux, R-devel, GCC | r-devel-linux-x86_64-fedora-gcc |
linux-x86_64-centos6-epel | CentOS 6, stock R from EPEL | r-release |
linux-x86_64-centos6-epel-rdt | CentOS 6 with Redhat Developer Toolset, R from EPEL | r-release |
linux-x86_64-rocker-gcc-san | Debian Linux, R-devel, GCC ASAN/UBSAN | r-devel |
macos-elcapitan-release | macOS 10.11 El Capitan, R-release (experimental) | r-release-osx-x86_64 |
macos-mavericks-oldrel | macOS 10.9 Mavericks, R-oldrel (experimental) | r-oldrel-osx-x86_64 |
solaris-x86-patched | Oracle Solaris 10, x86, 32 bit, R-patched (experimental) | r-patched-solaris-x86 |
ubuntu-gcc-devel | Ubuntu Linux 16.04 LTS, R-devel, GCC | r-devel |
ubuntu-gcc-release | Ubuntu Linux 16.04 LTS, R-release, GCC | r-release |
ubuntu-rchk | Ubuntu Linux 16.04 LTS, R-devel with rchk | r-devel |
windows-x86_64-devel | Windows Server 2008 R2 SP1, R-devel, 32/64 bit | r-devel |
windows-x86_64-devel-rtools4 | Windows Server 2012, R-devel, Rtools4.0, 32/64 bit (experimental) | r-devel |
windows-x86_64-oldrel | Windows Server 2008 R2 SP1, R-oldrel, 32/64 bit | r-oldrel-windows-ix86+x86_64 |
windows-x86_64-patched | Windows Server 2008 R2 SP1, R-patched, 32/64 bit | r-patched |
windows-x86_64-release | Windows Server 2008 R2 SP1, R-release, 32/64 bit | r-release-windows-ix86+x86_64 |
免费,而且是开源的
rhub:https://github.com/r-hub/
就是github
上,它是开源的,而且服务是免费的。
其实还能有别的用处
早在三年前,《无中生有windows版R包》中,我已经演示了另一种rhub
的用法,那就是使用这些平台来打R包,当年我只有Mac
和Linux
系统,然后我用rhub
来生成Windows
版本的R包,方便其他用户下载安装。
往期精彩
•R里的赋值符号?•再见joyplot•CS2: BED文件•一个要复活的R包和一个404的网站•[连载2]:Editor你的心不会痛吗?•[连载4]:我像是一颗棋,进退任由你决定•s01 - Counting DNA Nucleotides•xlim_tree: set x axis limits for only Tree panel