R: Difference between revisions
imported>Krey No edit summary |
imported>Krey No edit summary |
||
Line 14: | Line 14: | ||
In practice, R is commonly written inside editors like RStudio or inside a Jupyter Notebook. | In practice, R is commonly written inside editors like RStudio or inside a Jupyter Notebook. | ||
== RStudio == | |||
RStudio uses a standard set of packages and ignores any custom R environments, like the one set up above. To install it you can use <code>rstudioWrapper</code> just as we used <code>rWrapper</code> earlier. | RStudio uses a standard set of packages and ignores any custom R environments, like the one set up above. To install it you can use <code>rstudioWrapper</code> just as we used <code>rWrapper</code> earlier. | ||
<syntaxhighlight lang="nix> | <syntaxhighlight lang="nix> | ||
Line 20: | Line 20: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Jupyter Notebook == | |||
There is currently no package in nixpkgs to set up Jupyter Notebook with additional kernels. (Keep an eye on this [https://github.com/NixOS/nixpkgs/pull/33673 this pull request] though). | There is currently no package in nixpkgs to set up Jupyter Notebook with additional kernels. (Keep an eye on this [https://github.com/NixOS/nixpkgs/pull/33673 this pull request] though). | ||
Line 50: | Line 50: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== How does <code>rWrapper</code> work? == | |||
<code>rWrapper</code> simply replaces the R command in your path by a script that sets the environment variable <code>R_LIBS_SITE</code> and then runs R. [https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/r-modules/wrapper.nix] | |||
== External Documentation == | == External Documentation == | ||
* [https://nixos.org/nixpkgs/manual/#r-packages R user guide in nixpkgs manual] | * [https://nixos.org/nixpkgs/manual/#r-packages R user guide in nixpkgs manual] |