R: Difference between revisions

imported>Krey
No edit summary
imported>Jabranham
Show example of nix-shell usage
Line 12: Line 12:
and then you can put <code>R-with-my-packages</code> into your <code>environment.systemPackages</code> for a system-wide installation, for instance.
and then you can put <code>R-with-my-packages</code> into your <code>environment.systemPackages</code> for a system-wide installation, for instance.


In practice, R is commonly written inside editors like RStudio or inside a Jupyter Notebook.
If you with to use `nix-shell` to generate an on-the-fly environment with some R packages, the command is similar:
 
<syntaxhighlight lang="sh">
nix-shell --packages 'rWrapper.override{packages = [ rPackages.ggplot2 ];}'
</syntaxhighlight>


== RStudio ==
== RStudio ==