Category Archives: Uncategorized

GRASS GIS, powerful open source GIS Software

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

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

Rescale ranges

Lets say I have values in a range from 0-1 and I want to rescale them to a range of 1 to 25. Generally speaking this can be resolved by: n.min + (x – o.min) * (n.max – n.min)/(o.max – … Continue reading

Posted in Uncategorized | 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

Delete table from PostGIS

A table and all its dependencies in PostGIS can be deleted with:

Posted in 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

Finding presence data for species distribution modelling (SDM)

Getting presence data of species is often not easy and can be a major obstacle when attempting to model the distribution of species. One way is using the GBIF data base. Here I show one way how to obtain presence … Continue reading

Posted in R, SDM, Uncategorized | Leave a comment