Golden Rule 3 Use a Version Control System

A few years ago I used to run around with an USB-Stick for my projects: if I worked at my office I copied the files at the end of the day and took them with me to keep working on the project at home or at my other office. Getting tired of that (especially of me forgetting to copy all the files or taking the stick with me) I changed to a synchronization software that kept my files at the same state everywhere I worked. That was a great improvement, although it did not solve my second problem: Keeping track
Read the rest “Golden Rule 3 Use a Version Control System”

Formatted code in Word using Emacs

Sometimes I have to write some documentation using Word instead of LaTeX. In LaTeX you have some nice options for typesetting code be it R, Stata or Gams. In Word, however, there is no easy way to format your code. I found a nice way to get my code nicely formatted (in color) using Emacs: I installed the Windows version of Emacs and there I can “Quick Print” – “Preview with Web Browser”. This opens the file as htm in my browser. I now just save this file somewhere on my computer and open it in Word. The text is
Read the rest “Formatted code in Word using Emacs”

Set the repository for R

Every time you install a R package, you are asked which repository R should use.
To set the repository and avoid having to specify this at every package install, create a file .Rprofile in your home directory with the following text:
       myrepo = getOption(“repos”)
       myrepo[“CRAN”] = “http://stat.ethz.ch/CRAN/
       options(repos = myrepo)
       rm(myrepo)
 
 
Posted in R

Using the Gams Manuals in Gams-Mode

You can call the help and solver files from within Gams.mode hitting C-c Enter. Be sure that the directory for the help files is properly set (choose Customize Gams mode for Emacs from the Gams menu) and search for the following entry in the buffer:
 
If you hit enter, the gams manual is shown in your PDF viewer, but you can also search for another file. For example: type path and hit tab for completion: Gams-mode will show you two completions for ‘path’: PATH-Solver and PATH-LP-Solver.
You should also set the path of the PDF file
Read the rest “Using the Gams Manuals in Gams-Mode”

More on project management with Org

In one of my posts I talked about org-mode and how I use remember to organize my tasks, calls, etc. For every project I have such an org-file. I now added a file projects.org with all my projects for my different jobs. Here you see my projects for Ecoplan:
 
 
The project entry in this list is linked to my org-file for that project. In Emacs you can add a link by hitting C-u C-c C-l. It asks you for the path to the file and a description. The advantage of this file is that I now have an
Read the rest “More on project management with Org”