Author Archives: kariert

Statistical distributions in julia

This is a quick note on how to generate random variables in Julia and sample from them. We first needs to load the package Distributions. If it is not already installed, you can do so with: Pkg.add(“Distributions”) using Distributions All … Continue reading

Posted in julia | Tagged | Leave a comment

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

Add areas to a vector in GRASS

I sometimes use 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

Check ports

To check which ports are open on a server To check on the other hand which ports a server is listening to (before the firewall) run on the server where -t (tcp) -u (udp) -l (show listening sockets only) -p … Continue reading

Posted in Uncategorized | Leave a comment