Posts Tagged ‘ Tutorials ’

introduction to R: learning by doing (part 2: plots)

July 10, 2012
By
introduction to R: learning by doing (part 2: plots)

Lets go one with the second part of learning R by doing R (you will find the first part here. As we have used vectors, matrices and loops in the first part, we will concentrate on graphics in this one. but first we will need data to plot: Sometimes you will need several plots in

Read more »

introduction to R: learning by doing (part 1)

July 9, 2012
By
introduction to R: learning by doing (part 1)

Geography is often about statistics as it is the basis for fast exchange of information: providing a mean and standard deviation to the audience is often much easier then showing raw data: Learning a script language for this purpose can be a hard-ass work. But I think it is more often a need of practice.

Read more »

Applying a function successively in R

July 3, 2012
By
Applying a function successively in R

At the R in Finance conference Paul Teetor gave a fantastic talk about Fast(er) R Code. Paul mentioned the common higher-order function Reduce, which I hadn't used before. Reduce allows me to apply a function successively over a vector. What does that...

Read more »

Modeling Trick: Masked Variables

July 1, 2012
By
Modeling Trick: Masked Variables

A primary problem data scientists face again and again is: how to properly adapt or treat variables so they are best possible components of a regression. Some analysts at this point delegate control to a shape choosing system like neural nets. I feel such a choice gives up far too much statistical rigor, transparency and Related posts:

Read more »

reproducible documents/analytics in R: the knitr package

June 26, 2012
By
reproducible documents/analytics in R: the knitr package

When I am working in new institutions and I am asking: “Do you have a document management system?” I often get the answer:”Yap, we are using folders” … OKAY. Making analysis, developing applications and keeping an eye on code, data and applications make this even harder as it has to be. Of course not many

Read more »

Hodgkin-Huxley model in R

June 24, 2012
By
Hodgkin-Huxley model in R

One of the great research papers of the 20th century celebrates its 60th anniversary in a few weeks time: A quantitative description of membrane current and its application to conduction and excitation in nerve by Alan Hodgkin and Andrew Huxley. Only a...

Read more »

reading shape files in R

June 24, 2012
By
reading shape files in R

If I would like to adjust a shape file I normally used the way over an excel file or a text file to get a table and to join this with an existing shape file. Due to the sp and rgdal packages in R you can manipulate shapefiles directly in R: now lets map the

Read more »

setting your working directory permanently in R

June 24, 2012
By

Most of us R users are using a special working directory for the daily work in R. But I was bothered in typing everytime in my command line prior using R. Also using this line at the first position in scripts was not pleasent enough. So how to get around this? There is a special

Read more »

How to outrun a crashing alien spaceship

June 11, 2012
By
How to outrun a crashing alien spaceship

Hollywood movies are obsessed with outrunning explosions and outrunning crashing alien spaceships. For explosions the movies give the optimal (but unusable) solution: run straight away. For crashing alien spaceships they give the same advice, but in this case it is wrong. We demonstrate the correct angle to flee. Running from a crashing alien spaceship, Prometheus Related posts:

Read more »

Transforming subsets of data in R with by, ddply and data.table

June 11, 2012
By
Transforming subsets of data in R with by, ddply and data.table

Transforming data sets with R is usually the starting point of my data analysis work. Here is a scenario which comes up from time to time: transform subsets of a data frame, based on context given in one or a combination of columns.As an example I use ...

Read more »