Automating writing LaTeX papers even further

In an earlier post I wrote on how to use R to produce all kind of figures and tables for a LaTeX paper. This time, I will show, how to automate this process even more.

My work flow consists of a batch file, that runs my model, sends the results to R, produces my tables and figures and sends these to my paper: If I change my model, I just have to run this batch file, and the results in my paper are automatically adjusted. One smaller problem is that I often write in my text on a specific value … Read the rest “Automating writing LaTeX papers even further”

Migrating to R 3.0.0: TikzDevice and gdxrrw

I am an avid user of R. Most of the time, I use R for preparing nice plots and tables for my LaTeX papers. For my plots, I use TikzDevice and for my tables I use xtable. Gams, my modeling software, developed a nice interface for using data from Gams in R and the other way around (see http://support.gams.com/doku.php?id=gdxrrw:interfacing_gams_and_r). When I upgraded from R 2.15 to R 3.0, I had some problems on my windows 8 machine, especially with TikZDevice. I finally managed to get it installed. The necessary trick is described on “The Stata Things” (!!!, http://enoriver.net/index.php/2013/04/12/keeping-knitr-happy-after-upgrading-to-r-3-0-0/ )
Read the rest “Migrating to R 3.0.0: TikzDevice and gdxrrw”

Viewing all the objects in R in a buffer in Emacs

You also probably did not read the complete Emacs-Speaks-Statistics manual… ? By chance, I discovered a nice feature, called Rdired.
This command gives you a dired-buffer with all your objects. In this buffer you can view, edit and plot your R-objects. It is documented in chapter 12.9 of the manual.
 
Here is small example: In the buffer in the middle, you see the original code taken from the manual. I invoked ess-rdired and the lower buffer is shown. I then put the cursor on the line with the parameter s and hit “v”. This gave me the upper buffer
Read the rest “Viewing all the objects in R in a buffer in Emacs”

Using Gams, R and LaTeX I

Wow, I just discovered how easy it is to produce nice LaTeX tables from your Gams results. Usually I capture my model results in some parameters that are exported (using gdx or gdxxrw) to excel. Then I make my tables in Excel and use an excel add-in to export the table to LaTeX (I have written about this add-in in this blog). This works fine, but is tedious because as soon as my results are in excel, I can’t do things automatically and have to click my way to get my LaTeX tables.
Today, I was working on the parking
Read the rest “Using Gams, R and LaTeX I”

R-Graphics for Networks

With R you can make beautiful graphics and the nice thing is, you can design your own customized graphics. For some nice graphs produced with R, have a look at http://addictedtor.free.fr/graphiques/.
 
At the moment I am working on a parking model (searching for parking lots in the city) and have a simple grid for the streets and the junctions. If you start working with network models you have the problem that there is basic information for every node and on top of that you have for every node your results. Trying to interprete the results is hard. Either
Read the rest “R-Graphics for Networks”
Posted in R