-
Recent Posts
Recent Comments
Archives
- April 2021
- January 2021
- December 2020
- November 2020
- October 2020
- November 2014
- October 2014
- September 2014
- August 2014
- May 2014
- April 2014
- March 2014
- October 2013
- September 2013
- August 2013
- June 2013
- April 2013
- March 2013
- September 2012
- July 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
Categories
Meta
Category Archives: R
Creating an R package
I recently put all the EcoIP application into an R package. I was surprised at how easy it was and I wanted to share my experience :) Root Path Everything that is to be packaged needs to be in a … Continue reading
Posted in R
Tagged package, R, R build, R check, R Description, R help pages, R man directory, R namespace, R package
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 label font size, labels, non overlapping labels, par, R, X axis, x axis size
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 deflateSetHeader, EBImage, GTK+, ImageMagick, install EBImage, Process Explorer, R, RGui, Windows, zlib1.dll
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 command args, command arguments, commandArgs, CRAN getopt, getopt, getoptparse, parse arguments, R, Rscript, script arguments
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 bins, findinterval, indeces, index, interval, R command, vector
Leave a comment
R: Efficient data loading
I’m working with the HOG_01 directory from this dataset. They have organized so that each data point is a 1568 line text file. The data sets are also separated in 43 types. Unzip the data and you will see what … Continue reading
Posted in commands, PhD, R
Leave a comment
R filter rows based on an element
I need to separate a matrix based on the existence of an element in a row. I will end up with two matrices: the first will not contain the element on any of its rows and the second will contain … Continue reading
Posted in PhD, R
Leave a comment
Remove defined variables from R environment
When I am debugging a piece of code I usually do it inside the R-terminal. It’s nice to do things this way because you can poke at things when something goes wrong. The only disadvantage is that you mush “refresh” … Continue reading
Posted in PhD, R
Leave a comment
R : Finding the ordering index vector
The ordering index vector is a vector that contains indices of another vector. It’s basically the other vector, but ordered (decreasing or increasing). Instead of having the values it has the indices :) I spent close to an hour to … Continue reading
Posted in commands, R
3 Comments