fred_mouse: line drawing of sheep coloured in queer flag colours with dream bubble reading 'dreamwidth' (Default)
fred_mouse ([personal profile] fred_mouse) wrote2015-11-12 10:01 am

Linkspam - R edition

Looking a few things up for work, keeping the links here for later. Somewhat on the technical side, because I'm at the 'how the hell do I hack the thing that works over there, and the thing that works over other-there, so that they work together here' stage of prepping graphs for publication. Urgh.

Goals: find a) how to get TMD plots with standard deviation lines (cannot get reference lines on at all, let alone working out how to specify them) and b) how to get a line break in a y-axis (or x-axis) label in lattice when one has already split the label so that each row has a separate label. .

Using Lattice Graphics in R
- very detailed, covers pretty much all the options, shows some neat hacks.

Advanced Graphics (lattice) - in particular, the example on how to grab settings and modify some of them, using trellis.par.get() and trellis.par.set(). Also good plain language explanation of all the panel.[thing] commands.

b) solved by looking at this page about how to get a line break and a superscript - what I'm actually doing is creating a fraction without a line ('atop'), and then filling both numerator and denominator with complicated text (superscript, ohms symbol). ie. did not actually end up combining lattice and base graphics text function. Not really a surprise.... [for future reference: \n gives a line break]