Add an "Install an R package from source" section.
JeppeX (talk | contribs)
m A note on knitr: : add example
 
Line 199: Line 199:
To knit a .Rmd file to a pdf (or .Rnw), you need to have included in your envronment <code> pkgs.texlive.combined.scheme-full</code>as well as <code> pandoc </code> or it will fail to knit. None of the other texlive packages contain the proper "frame" package. Note there are likely other workarounds but this requires the least effort.
To knit a .Rmd file to a pdf (or .Rnw), you need to have included in your envronment <code> pkgs.texlive.combined.scheme-full</code>as well as <code> pandoc </code> or it will fail to knit. None of the other texlive packages contain the proper "frame" package. Note there are likely other workarounds but this requires the least effort.


If <code>R</code> is included (using wrapper) but <code>pandoc</code> is not wanted in the user environment, one can expose it just for the R with
<syntaxhighlight lang="nix">
(rWrapper.override{
  packages = with rPackages; [
    markdown
    # other plugins go also here
  ];
}).overrideAttrs (old: {
  buildInputs = (old.buildInputs or []) ++ [
    pkgs.pandoc
  ];
});
</syntaxhighlight>
== Other Editors ==
== Other Editors ==