Archive for August, 2011

Vertically Align x-axis Labels in an R plot

When you are creating a plot in R, sometimes you have axis labels on the x axis. You can create custom ones with the axis function. If your labels are long, you can bring them apart using a newline character so they span multiple lines. But when you do this, it centers the text vertically [...] Read more »

How to echo a Tab or Other Special Characters in Linux

I’m working on a bash script that I want to insert some text into a file. So I’m using the echo command to do this, like so:

echo “hello, world” > myfile.txt

This works just great. Now I want to insert a special character into the file. So I need to do two things: 1) escape special [...] Read more »