Blog Archives

Version control, gitbucket and SourceTree style

May 31, 2013
By
Version control, gitbucket and SourceTree style

Last time I wrote about version control using Subversion (and its implementation in Eclipse). I still haven’t given up on it, but since I’m using a private repository, sharing code has been a bit tedious. I was introduced to git a while ago, but somehow decided to go for Subversion. A few days ago a

Read more »

How to branch/fork a (StatET) project with SVN

August 14, 2012
By
How to branch/fork a (StatET) project with SVN

I was introduced to version control at the 2011 Belgrade R+OSGeo in higher education summer school. I’ve been using it in my daily work ever since. Recently the need to branch my project came up and this post describes how after a few hours of reading teh internets satisfied my need. In a nutshell, you

Read more »

Show me yours and I’ll show you mine

August 9, 2012
By
Show me yours and I’ll show you mine

I remember when I started with R, there was little processing power directed toward an IDE. I had enough problems with the syntax, loops and the like and R gui seemed adequate. When I started working on a heavy project, I had to knock it up a notch (bam!). After weeks of trial and error

Read more »

Getting knitr to work with StatET

April 13, 2012
By
Getting knitr to work with StatET

StatET (an Eclipse plug-in that can handle, among other things, R) offers support for writing Sweave (.Rnw) documents. This is done via the external tool dialog, where one creates a new “device” that takes in a document and runs it over appropriate functions and programs. In this case, Sweave and LaTeX. This dialog can, however,

Read more »

Write data (frame) to Excel file using R package xlsx

February 12, 2012
By
Write data (frame) to Excel file using R package xlsx

Writing to Excel files comes up rather often, especially if you’re collaborating with non-OSS users. There are several options, but I like the xlsx package way of doing things. Authors use Java to write to Excel files, which are basically compressed XML files. Alright, let’s get cracking. First, let’s create some data. If you don’t

Read more »

Adding lines or points to an existing barplot

January 15, 2011
By
Adding lines or points to an existing barplot

Sometimes you will need  to add some points to an existing barplot. You might try but you will get a funky looking line/points. It’s a bit squeezed. This happens because bars are not drawn at intervals 1:10, but rather on something else. This “else” can be seen if you save your barplot object. You will

Read more »

Modeling sound pressure level of a rifle shot

November 1, 2010
By
Modeling sound pressure level of a rifle shot

Noise can be classified as pollution and lawmakers often (always?) treat it as such. Noise can have different origin points, point source being among the simplest to model. Because noise has broader health implications, being able to understand its propagation, a simple model can further our understanding in toning down or preventing excessive noise burden

Read more »

Dump R datasets into a single file

August 21, 2010
By
Dump R datasets into a single file

Should you need datasets that come with R and additional packages (you can access them via data()) in one single file, here’s what I did to dump the entire workspace into one file: This code can easily be adapted to dump individual dataset into its own file.

Read more »

Bootstrap, strap-on, anal-yzing… statistics is getting weirder by the moment

July 29, 2010
By
Bootstrap, strap-on, anal-yzing… statistics is getting weirder by the moment

I have spent the better portion of the day trying to get a bootstrap working. I have adapter a pre-written bootstrap function, but I wanted to use a generic function, mostly for reaping fame and glory. My hypothesis was that writing a hand-written, unoptimized function will consume more computer time than the generic, presumably optimized,

Read more »

How to calculate with dates and hours in R

July 24, 2010
By
How to calculate with dates and hours in R

A while ago I was asked whether calculating with datums and hours is possible in R. Especially, if you added an hours to 23:45 (say Jan 1, 2010) , would R know to jump to the next day – 00:45 (jan 2, 2010)? The answer is yes. Our only job is to tell R in

Read more »