R: Difference between revisions

From NixOS Wiki
imported>Krey
Created page with "R is a "free software environment for statistical computing and graphics." == Installation == [https://www.r-project.org/ R] comes with a very large number of packages, many..."
 
imported>Krey
No edit summary
Line 4: Line 4:
[https://www.r-project.org/ R] comes with a very large number of packages, many of which available through nixpkgs. In particular, any package available through [https://cran.r-project.org/ CRAN].
[https://www.r-project.org/ R] comes with a very large number of packages, many of which available through nixpkgs. In particular, any package available through [https://cran.r-project.org/ CRAN].


Similarly to [[Python]], your packages must be declared when installing R. Commands such as <code>install.packages("ggplot2")</code> will not succeed.
Similarly to [[Python]], your packages must be declared when installing R. Commands such as <code>install.packages("ggplot2")</code> will not work.


To install R will a collection of packages, a new nix package must be defined, for instance
To install R will a collection of packages, a new nix package must be defined, for instance

Revision as of 14:10, 13 April 2018

R is a "free software environment for statistical computing and graphics."

Installation

R comes with a very large number of packages, many of which available through nixpkgs. In particular, any package available through CRAN.

Similarly to Python, your packages must be declared when installing R. Commands such as install.packages("ggplot2") will not work.

To install R will a collection of packages, a new nix package must be defined, for instance

with pkgs;
let
  R-with-my-packages = rWrapper.override{ packages = with rPackages; [ ggplot2 dplyr xts ]; };
in ...

and then you can put R-with-my-packages into your environment.systemPackages for a system-wide installation.