Category Archives: R

Statistical software with many packages

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 unzip rm 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

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/

Posted in R, Uncategorized | Tagged | Leave a comment

Stacked histogram with ggplot2

With ggplot2 there is a possibility to create divide bars of a histogram into different categories:

Posted in ggplot2, R, Uncategorized | Leave a comment

ROC – plot

There are many implantation in R already of ROC plots (e.g. in the packages PresenceAbsence, ROCR). I just wrote my own very simple script just to get a better understanding of it.

Posted in R | Leave a comment