Blog Archives

Bubble sort implemented in pure R

Please note that this is programming I purely did for the learning experience. The pure R bubble sort implemented in this post is veeeeery slow for two reasons: Interpreted code with lots of iteration is very slow. Bubble sort is

See more ›

Tagged with: , , ,
Posted in R stuff

Parsing complex text files using regular expressions and vectorization

When text data is in a nice CSV format, read.csv is enough to parse it into a useable format. But if this is not the case, getting the data into a useable format is not so straightforward. In this post

See more ›

Tagged with: , ,
Posted in R stuff

Automatic spatial interpolation with R: the automap package

In case of continuously collected data, e.g. observations from a monitoring network, spatial interpolation of this data cannot be done manually. Instead, the interpolation should be done automatically. To achieve this goal, I developed the automap package. automap builds on

See more ›

Tagged with: ,
Posted in R stuff

Data Mining with R course taught by Luis Torgo

From the 25th of march onwards, Dr. Luis Torgo will teach a Data Mining with R course together with the DIKW Academy in Nieuwegein, The Netherlands. Dr. Torgo is an Associate Professor at the department of Computer Science at the

See more ›

Tagged with: , ,
Posted in Announcements, R stuff

Predicting the memory usage of an R object containing numbers

To estimate if a certain vector of numbers will fit into memory, you can quite easily predict the memory usage based on the size of the vector. An integer vector will use 4 bytes per number, and a numeric vector

See more ›

Tagged with:
Posted in R stuff

Custom axis transformations in ggplot2

To apply a data transformation on an axis in a ggplot, you can use coordinate transformations. For more detail see the ggplot2 documentation. A number of coordinate transformations is available, including log10 and sqrt. However, if you want to perform

See more ›

Tagged with: ,
Posted in R stuff

Cleaning sentences by recursively merging words using R

A question on StackOverflow really sparked my attention. The aim was to clean up a dataset of inappropriately spaced words. For example:

My approach was to create what I call a wordpair object. The word pair object for the

See more ›

Tagged with: ,
Posted in R stuff

R and presentations: a basic example of knitr and beamer

Manually combining R code and a presentation can be quite a pain. Luckily, using tools like odfWeave, Sweave and knitr, integrating documents and R code is quite painless. In this post I want to take a look at combining the

See more ›

Tagged with: , ,
Posted in R stuff

RStudio Server part 3: using an ssh tunnel for high performance

In part 2 of this series of posts on RStudio Server, I commented that I suspected that RStudio Server would be fast. The first time I tried this from a remote connection, I was disappointed with the performance. Many companies

See more ›

Tagged with: , ,
Posted in R stuff

RStudio Server part 2: pros of using RStudio server for a remote connection

After playing around with R studio server for a while, I decided to write a followup to my previous blog post. I want to go over a few of the strong points of using RStudio server to access a remote

See more ›

Tagged with: , ,
Posted in R stuff