What is a good setup for LaTeX and R?

I am not sure if this is the proper place for this question, so my apologies if it is not.

I want to switch from Windows to Ubuntu, or at least have an additional operating system next to windows. I have tried Ubuntu before but never really liked the text editors and R console I found. The main things I need to do is programming in R, compiling packages, compiling C++ (with Rcpp + inline) and writing LaTeX documents (with Sweave).

So I was wondering:

  • Is Ubuntu a good Linux distribution for statistical programming?
  • What is a good text editor for Ubuntu?
  • What is a good R console / IDE for Ubuntu?
  • What is a good LaTeX editor / distribution for Ubuntu

Solution 1:

In order:

  1. Yes, as the R packages are well maintained, and you get the CRAN builds of R so you are not even lagging behind.
  2. I like Emacs. (Also see dozens of posts at StackOverflow and other StackExchange sites on editor choice.)
  3. I like Emacs with ESS. (Dito for R editor choices.)
  4. I like Emacs with AucTex.

All snickering aside, many R Core members use the same combination of Emacs + ESS + AucTex.

Also, while learning Emacs is surely a good thing in the long run, there are many decent editors in Ubuntu that can be used for R, LaTeX and C++. Some folks seem to like Geany; I am sure you can find something suitable too.

Solution 2:

Here are my two cents:

  1. Yes. I'm a statistician and have been professionally using Linux-based Operating systems for almost a decade. There are GNU/Linux versions of all major statistical software such as SAS, SPSS, Stata and, of course, R, which feels right at home on Unix systems. Moreover, Linux distros tend to be less resource-hungry than their competitors, so you might even notice your programs run faster on GNU/Linux than on Windows or Mac.
  2. Emacs is really popular among power users, but for simple text editing I prefer LibreOffice Writer (especially when I'm working with Microsoft Word users).
  3. My favorite R IDE is RStudio (http://www.rstudio.com/), by a mile! It hasn't gone stable yet, and has a few annoying bugs, but nothing that would compromise the quality of your work. I find it very intuitive, and the fact that it's multi-platform really helps my workflow, since I also work on Microsoft and Apple machines.
  4. If you're using LaTeX with R, RStudio's got you covered! It allows you to write and compile pure LaTeX as well as LaTeX + Sweave or knitr. RStudio's LaTeX editor is decent, but if you're writing more complex texts and want something with more features (it's pretty easy to get lost inside long documents), I'd recommend Texmaker (http://www.xm1math.net/texmaker/); it probably has all the features you're asking for... and then some!

Solution 3:

  1. Yes, though some people I know found switching from WinEdt a bit hard.
  2. I like gedit, the default text editor in Ubuntu, though there are a lot of other text editors that are also good. A matter of personal preference.
  3. Try RKWard in the Ubuntu Software centre.
  4. By searching in the Ubuntu software centre for "LaTeX" you will get some good results. I would try Texmaker.

Solution 4:

For Latex I like Texmaker. You can download it from the Software Center but it's outdated, so I recommend grabbing the lastest version from their website. Alternatively you could also take a look at Kile.

Regardless of the editor you choose, you need a Latex compiler like TexLive, it's also in the software center.