Category Archives: commands

These are useful linux commands that I have found while doing stuff. Putting them here so I don’t forget.

Define default values for bash scrip arguments

Note to self: bash is cool!!!! I was made aware that you can define a default value for a variable in the following manner: ${parameter:-word} So if parameter is unset or null, the expression is replaced with the expansion of … Continue reading

Posted in commands | Tagged , , , , | Leave a comment

PDF word statistics in one “looong” line

The paper that I am writing requires some background information about how digital imaging has been related to phenology. For this I have decided to implement an SLR. I am at the point in the SLR process where I have … Continue reading

Posted in commands | Tagged , , , , , , , , , , , , | Leave a comment

R. create a plot with non overlapping labels

The X axis labels were a bit long and they were having trouble fitting into the plot correctly. I tried various solutions: R’s default and maptool’s pointLabel. The first did not really allow me to turn the labels 90 deg … Continue reading

Posted in commands, R | Tagged , , , , , , | Leave a comment

Very Painful EBImage install on Windows

Short Version Follow this to install EBImage Go here to get GTK+. I used this one. Make sure you add the GTK+ “bin” directory to the path. If you have zlib1.dll problems, or any problems regarding the specific dll that is … Continue reading

Posted in commands, R | Tagged , , , , , , , , , | Leave a comment

sshfs: where were you all along :)

Did you know that you could mount a remote directory (any directory accessible to you) through an ssh command? I was reading 16 ultimate ssh hacks by Carla Schroder and found out this little piece of heaven. The command is sshfs. You use … Continue reading

Posted in commands | Tagged , , , , | Leave a comment

Rscript, where were you all along?

One of the things that I did not like about using R was that there was not “easy” way of calling it in a command sort of way. The test part of my R workflow consisted in going into the … Continue reading

Posted in commands, PhD, R | Tagged , , , , , , , , , | Leave a comment

R: Index of an interval of a number in a vector

Try findInterval :). Let me try to explain what I mean with this title. I have a vector of numbers. The numbers represent bin limits. For example c(1,2,3) is a vector that represents 2 bins. The first is [1,2) and … Continue reading

Posted in commands, R | Tagged , , , , , , | Leave a comment