[英]nix-shell with R interpretter and submodules
我可以使用帶有nix-shell的必需子模塊(例如ggplot2)的R嗎?
例如,將Python與子模塊一起使用:
nix-shell -p python34 python34Packages.pandas
但是,我似乎無法看到如何與R等效。
nix-shell -p R
給我一個香草R,但子模塊怎么樣? 我不確定我是否足夠了解使用nix-shell來評估nix表達式,但是這可以從nix-shell中用作命令嗎?
注意:我不希望在shell.nix
或default.nix
彈出上面鏈接中的shell.nix
。 而不是單個命令。
您可以使用-E
標志將nix表達式傳遞給nix-shell
。 所以以下是有效的:
nix-shell -E 'with import <nixpkgs> {}; rWrapper.override {packages = with rPackages; [ggplot2 reshape2];}'
您可以使用與Python示例中相同的方法:
nix-shell -p R rPackages.dplyr rPackages.ggplot2
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.