Re: [R] which(df$name=="A") takes ~1 second! (df is very large), but can it be speeded up?

2008-08-12 Thread Peter Cowan
Emmanuel, On Tue, Aug 12, 2008 at 4:35 PM, Emmanuel Levy <[EMAIL PROTECTED]> wrote: > Dear All, > > I have a large data frame ( 270 lines and 14 columns), and I would like to > extract the information in a particular way illustrated below: > > > Given a data frame "df": > >> col1=sample(c(0,1)

Re: [R] gridBase and new.page() / grid.newpage()

2008-08-10 Thread Peter Cowan
pushViewport(viewport(xscale = c(0, 1), layout.pos.col = 1)) grid.rect(gp=gpar(fill="grey")) grid.points() upViewport() upViewport() } myplot(Aplot) myplot(Aplot) pdf() myplot(Aplot) myplot(Aplot) dev.off() On Sun, Aug 10, 2008 at 1:48 PM, Paul Murrell <[EMAIL PROTECTED]>

Re: [R] grid layout scaling viewport width based solely on height

2008-08-10 Thread Peter Cowan
Paul, That is exactly what I was looking for. Thank you! Peter On Sun, Aug 10, 2008 at 1:41 PM, Paul Murrell <[EMAIL PROTECTED]> wrote: > Hi > > > Peter Cowan wrote: >> Paul, >> >> On Wed, Aug 6, 2008 at 1:40 PM, Paul Murrell <[EMAIL PROTECTED]> wrote

[R] gridBase and new.page() / grid.newpage()

2008-08-07 Thread Peter Cowan
Hello all, I'm trying to write a function using the gridBase package. I'd like to push several base subplots to a larger plot constructed with grid. However, I'm having trouble getting consistent results when running the function when the plotting window (quartz) is closed, when it is left open a

Re: [R] grid layout scaling viewport width based solely on height

2008-08-07 Thread Peter Cowan
Paul, On Wed, Aug 6, 2008 at 1:40 PM, Paul Murrell <[EMAIL PROTECTED]> wrote: >> I'm trying to write a function that produces a main plotting region >> with several square plots along the right side. Ideally the size of >> right side plots will scale only with the height of the entire plot, >> ye

[R] grid layout scaling viewport width based solely on height

2008-08-06 Thread Peter Cowan
Hello all, I'm trying to write a function that produces a main plotting region with several square plots along the right side. Ideally the size of right side plots will scale only with the height of the entire plot, yet never overlap with another secondary plot. The following two snippets get cl