Category Archives: Computer

Anything to do with computers, but mainly R, GRASS, BASH and LaTex

Setting up emacs org-mode babel for R on Ubuntu

I installed org-mode seperately, since I had troubles with its default setting (similar to the problems described here). sudo apt-get install org-mode Next I download and installed ESS cd ~/.emacs.d/ wget http://ess.r-project.org/downloads/ess/ess-12.09-1.zip unzip ess-12.09-1.zip rm ess-12.09-1.zip Finally I had to … Continue reading

Posted in Computer, R, Ubuntu | 1 Comment

Vim-R-plugin: Installation

On Ubuntu 12.04, I took to the following steps to install Vim-R-plugin: First I had to install timux: sudo apt-get installl tmux Having already installed vim-pathogen, I used git to clone to install vim-r-plugin and vim-screen plugin, which is also … Continue reading

Posted in BASH, R, vim | 8 Comments

Reproducible research with markdown, knitr and pandoc

Over the last few weeks I was trying to optimise my workflow using markdow in combination with knitr and pandoc. Knitr is a grea new package by Yihui, expanding R’s capabilities for reproducible research. I will illustrate my work flow … Continue reading

Posted in Computer, R, Uncategorized | Tagged , , | 11 Comments

lubridate: working with date and time in R

Working with date and time in R is sometimes tricky. Today I gave lubridate a try and was surprised on how easy it can be. Lubridate is a available on git and on CRAN. There is also a good introduction … Continue reading

Posted in R, Uncategorized | 1 Comment

Add areas to a vector in GRASS

I sometimes use r.to.vect to convert a raster map in GRASS to a vector map. One way to find the area of each of the new polygons is: This will add the column area to forests and updates it with … Continue reading

Posted in Computer, GRASS | Leave a comment

Kill all processes of a user

To list all processes of myuser:

Posted in BASH, Ubuntu | Leave a comment

Read zipped file into R

Sometimes I do not want to unzip files before reading them to R. There is a nice way of reading zipped file (via a tmp dir) into R. Where the file test.csv is actually located in the: ~/files/myzip.zip/test.csv.

Posted in R, Uncategorized | Tagged | Leave a comment