简体   繁体   English

在R中模拟软件包的安装

[英]Simulate installation of package in R

Is there a way from within R to simulate the installation of a package, without actually installing it? 是否有一种方法可以从R内部模拟软件包的安装,而无需实际安装它?


If you know Debian or Ubuntu, what I have in mind is something like the -s parameter of apt-get there. 如果您了解Debian或Ubuntu,我的想法就像apt-get那样的-s参数。

Best way to do something like this on Linux is to create ramdisk. 在Linux上做这样的事情的最佳方法是创建ramdisk。 You'll simulate whole installation, it is very fast, and it will be gone as soon as you reboot/unmount ramdisk. 您将模拟整个安装,速度非常快,一旦重新启动/卸载ramdisk它就会消失。 Along the lines 沿线

> sudo mount -t tmpfs -o size=512m tmpfs /mnt/ramdisk

or add line to /etc/fstab 或者在/ etc / fstab中添加一行

> tmpfs       /mnt/ramdisk tmpfs   nodev,nosuid,noexec,nodiratime,size=512M   0 0

and then as suggested 然后按照建议

> R CMD INSTALL --library=/mnt/ramdisk pkg_name

or other installation tests as desired 或根据需要进行其他安装测试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM