[R] Lattice to ggplot2: Reference graphics across facets

2012-10-22 Thread Jim Price
problems much appreciated. Jim Price. Strength in Numbers. ### Sample code ### # Packages library(plyr) library(reshape2) library(ggplot2) library(lattice) library(latticeExtra) # User functions Factor <- function(...) factor(..., levels = ...) PAN <- function(x1, y1, x2, y2, txt, ...)

Re: [R] Adding text to page margin with lattice graphics

2011-04-07 Thread Jim Price
0.01) xyplot( 1 ~ 1, par.settings = list(layout.heights = list(bottom.padding = 10)), page = pager(10) ) So the pager function returns a function, and I use this returned function to give my proper page numbering. Hope that helps, Jim Price. Cardiome Pharma Corp. Dennis F

Re: [R] Lattice: Feature Request

2011-03-11 Thread Jim Price
data = temp )) lattice.options(oldopts) If the scales option worked like as.table, aspect, etc, then I wouldn't need to use a default.scales call per xyplot. Just trying to remove some typing from each call that I make. Jim. Peter Ehlers wrote: > > On 2011-03-10 15:07, Ji

[R] Lattice: Feature Request

2011-03-10 Thread Jim Price
glish_United States.1252LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] latticeExtra_0.6-14 RCol

Re: [R] Lattice: useOuterStrips and axes

2011-03-01 Thread Jim Price
Thank you, that's exactly what I needed. -- View this message in context: http://r.789695.n4.nabble.com/Lattice-useOuterStrips-and-axes-tp3330338p3330613.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing lis

[R] Lattice: useOuterStrips and axes

2011-03-01 Thread Jim Price
rop the 2nd and 3rd columns of y-axes labels, so the panels become a contiguous array. Is this possible? Thanks, Jim Price. Cardiome Pharma. Corp. -- View this message in context: http://r.789695.n4.nabble.com/Lattice-useOuterStrips-and-axes-tp3330338p3330338.html Sent from t

[R] testInstalledBasic question

2010-05-05 Thread Jim Price
;">=" [17] "abs" "acos" "acosh""all" "any" "Arg" "as.character" "as.complex" [25] "as.double""as.integer" &

Re: [R] Competing with SPSS and SAS: improving code that loops through rows (data manipulation)

2010-03-27 Thread Jim Price
mp, do.call(cbind, results)) colnames(final)[-(1:6)] <- paste(substr(constants$vars, 1, 1), constants$c1, 100*constants$c2, '..transf', sep = '.') }) Jim Price. Cardiome Pharma Corp. -- View this message in context: http://n4.nabble.com/Competing-with-SPS

[R] Bold greek letters using plotmath

2010-03-23 Thread Jim Price
I'm trying to annotate some graphics using plotmath and finding out that the code I'm using isn't bolding the greek letters - it bolds the rest (once I adjusted the numerics to characters), it's just failing on the greek characters. Any suggestions welcomed. Jim Price.

Re: [R] Splitting device for ggplots?

2008-11-03 Thread Jim Price
} } grid.mfrow(c(2,3), myPlot1, myPlot2, myPlot3, myPlot4, myPlot5, myPlot6) Jim Price Cardiome Pharma Corp. Spinu Vitalie wrote: > > Thanks Baptiste and Hadley, > > That viewports mechanism is indeed extremely versatile when it comes to > publication or designing new plo

[R] layout is to xyplot as ??? is to qplot

2008-07-10 Thread Jim Price
ed an obvious help-page somewhere! Thanks in advance, Jim Price Cardiome Pharma Corp. -- View this message in context: http://www.nabble.com/layout-is-to-xyplot-as-is-to-qplot-tp18391206p18391206.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Re membering the last time an event occurred within a dataframe

2008-07-03 Thread Jim Price
vid == 1))) > > > On Thu, Jul 3, 2008 at 3:19 PM, Jim Price <[EMAIL PROTECTED]> wrote: > >> >> All, >> >> I am constructing a pharmacokinetic dataset and have hit a snag. The >> dataset >> can be demonstrated in the following way: >&

[R] Re membering the last time an event occurred within a dataframe

2008-07-03 Thread Jim Price
ulation in R and I just can't get my head around the code to solve it. I've been eyeballing rle and I think there may be a solution hiding in there somewhere, but I'm still failing to progress. Any help would be appreciated! Thanks in advance, Jim Price Cardiome Pharma. Corp.

[R] Custom strips in lattice

2008-06-18 Thread Jim Price
anks as, despite being a fairly frequent lattice user, I've learnt a great deal from it - although I've not finished it yet, so if the answers are in there somewhere my apologies!) and couldn't see these issues addressed. If anyone has a solution it would be much appreciated. Thanks!

[R] Lattice + Word: Changing .wmf files to .pdf files

2008-06-04 Thread Jim Price
2 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] lattice_0.17-6 loaded via a namespace (and not attached): [1] grid_2.7.0 Jim Price. Cardiome Pharma Corp. -- View this message in context: http://www.nabble.com/Latt

[R] xyplot: subscripts, groups and subset

2008-05-16 Thread Jim Price
ttached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] lattice_0.17-6 loaded via a namespace (and not attached): [1] grid_2.7.0 Thanks, Jim Price Cardiome Pharmaceutical Corporation. -- View this message in context: http://ww

[R] setHook and lattice

2008-02-29 Thread Jim Price
Hi, I am trying to find a way to automate production of page numbers in plots produced using the lattice package. To do this, I started playing around with setHook which works fine with vanilla plot, but the hook 'plot.new' doesn't appear to be relevant to the lattice package. I was wondering if

Re: [R] Ceiling to the nearest ten?

2008-01-14 Thread Jim Price
A suggestion for a family of such functions: ceilGenerator <- function(num) function(x) num * ceiling(x / num) ceil10 <- ceilGenerator(10) ceil20 <- ceilGenerator(20) ceil10(1:10 * 4) ceil20(1:10 * 4) Lauri Nikkinen wrote: > > R-users, > > Is there a function for ceiling to the

Re: [R] Fitting large titles in a plot

2007-12-06 Thread Jim Price
unction to 2 lines of code" half a dozen people have already shown exactly how you can do that, making me look totally incompetent. Ah well, such is life :) Jim. Marc Schwartz wrote: > > > On Thu, 2007-12-06 at 09:28 -0800, Jim Price wrote: >> I wrote a little utility fu

Re: [R] Fitting large titles in a plot

2007-12-06 Thread Jim Price
I wrote a little utility function for exactly this reason, which I use with long titles. You may want to add calls to par to adjust the upper margin if you are using raw graphical functionality (plot et al) - but lattice adjusts the upper margin automatically so you wouldn't need to add anything e