Archive for August, 2009

How to Sort Strings w/ Numbers in Java

In this post, I explain the problem of sorting strings that contain numbers. If you just sort values using the default approach, it will not work properly. For example, it will sort “a10″ before “a2″ even though in your application you may want it to consider the alphabetic characters separately from the numeric ones in [...] Read more »

How to Run an R Script from the Command Line

I’m writing this post because I just spent a couple of hours banging my head against the wall, trying to figure out how to run an R script from the command line. It was working if I simply ran it at the command line. But when I try to run the same command from Java [...] Read more »

Pass Parameters to a Dynamically Invoked Function in R

In my last post, I explained a nifty way to invoke a function dynamically when you have the name of the function in a character object (in R). However, this didn’t explain how you could pass parameters to that function. I found a way to do this, which I will explain below, though it is [...] Read more »

Dynamically Invoke a Function in R

One way the R programming language has been described is that it is a functional programming language. Whether it would be called this by purists, I don’t know. But part of what this means is that all functions are treated as objects. So you can pass functions around very easily. This might sound strange, but [...] Read more »

Double Quotes in LaTeX

LaTeX is a typesetting system that you can use to produce high quality documents. I’m starting to use it now to write my dissertation. It has a bit of a learning curve, but I’m thinking it will probably save me a lot of pain and anguish in the long run in writing my dissertation. I’ll [...] Read more »