简体   繁体   English

在鼠尾草中更改R默认路径(.libPaths)

[英]Change R default path (.libPaths) in sage

I want to use the same directory for my addon R-packages that I use in standalone R. The following works from within sage: 我想对独立R中使用的插件R包使用相同的目录。

r(".libPaths('/home/USERNAME/R/my-libraries')")

But when I include this line in ~/.sage/sagerc or ~/.sage/sage.init it doesn't work. 但是,当我将此行包含在~/.sage/sagerc~/.sage/sage.init它行不通。 Is there a file in the /opt/sage/ - tree where I can configure this? /opt/sage/ -树中是否有文件可以配置?

I think the proper place to do this is ~/.sage/init.sage . 我认为执行此操作的合适位置是~/.sage/init.sage Or was that a typo? 还是那个错字? (In which case I'm really surprised it works in Sage but not there.) (在这种情况下,我真的很惊讶它可以在Sage中运行,但不能在其中运行。)

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

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