This function will extract time labeled variables (or any variables with consistent naming) by name from a data frame in the order in which they appear in the data frame. This is especially useful in cases when one has a longitudinal or time-series data set where each row (subject) has many occasions of measurements for each measure. Code and examples after the jump.
The input is specified as the row-wise lower triangle or column-wise upper triangle.
http://www.daimi.au.dk/~besen/TBiB2007/lecture-notes/rpy.html
While I've never used it, I can definitely see doing so, as I've recently become more and more a python programmer.
The function and documentation is listed after the jump.
If you're not happy with what R puts on the axes of your plot (tickmarks, labels etc), plot with "axes=F", then add custom axes with the "axis()" function.
When using arrays in for loops, you may experience incomplete looping for various reasons (bad data, system failure, etc.). When using large numbers of loops and/or when some task within the loop takes a large amount of time, you may consider saving your objects at the end of each loop. If the something goes wrong, you can pick up where you left off by changing the counters in the for loops.
You have a plot, and you want to draw a grid behind it. If you add the grid to the plot, using either
grid()or
abline(), the lines will be added on top of your plot, not behind it. I found the solution on the R-help mailing list, here. Redraw the plot after adding the grid, but first set
par(new=T)so that it will be drawn on top of the old plot on the same device.