Dear alltogether, how can a delay like possible with par(ask=TRUE) be attained while using trellis-plots within a loop or something like that? the following draws each plot without waiting for a signal (mouse-klick), so par() does not work for that: library(nlme) for(i in 1:3) { fitlme <- lme(Orthodont) par(ask=TRUE) # does not work with trellis.... print( plot(augPred(fitlme)) ) } thanks, leo -- email: leog at anicca-vijja.de www: http://www.anicca-vijja.de/
Hi, I'm using gregexpr(). As a result something like this: # starting positions of the match: [[1]] [1] 7 18 # length of the matched text: attr(,"match.length") [1] 4 4 Now, I'd like to have a matrix, 7 4 18 4 but I don't know how to handle the attr(,"match.length") ...? The format of the output is pretty unclear to me in that respect. Thanks in advance, Petri ---------------------- Petri Palmu, M.Soc.Sc Statistician petri.palmu at geneos.fi Geneos Ltd tel:+358 9 4366 2512 gsm: +35840 55 249 55 fax:+ 358 9 4366 2523 P.O. Box 25 (Tukholmankatu 2) FIN-00251, Helsinki, Finland
Now I found a solution that seems to work OK for me: attributes(gregexpr(expression, text)[[1]]) Petri At 15:00 11.1.2006 +0100, Petri Palmu wrote:>Hi, > >I'm using gregexpr(). As a result something like this: > ># starting positions of the match: >[[1]] >[1] 7 18 > ># length of the matched text: >attr(,"match.length") >[1] 4 4 > >Now, I'd like to have a matrix, > 7 4 >18 4 > >but I don't know how to handle the attr(,"match.length") ...? >The format of the output is pretty unclear to me in that respect. > >Thanks in advance, >Petri >---------------------- >Petri Palmu, M.Soc.Sc >Statistician >petri.palmu at geneos.fi > >Geneos Ltd >tel:+358 9 4366 2512 >gsm: +35840 55 249 55 >fax:+ 358 9 4366 2523 >P.O. Box 25 (Tukholmankatu 2) >FIN-00251, Helsinki, Finland > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html---------------------- Petri Palmu, M.Soc.Sc Statistician petri.palmu at geneos.fi Geneos Ltd tel:+358 9 4366 2512 gsm: +35840 55 249 55 fax:+ 358 9 4366 2523 P.O. Box 25 (Tukholmankatu 2) FIN-00251, Helsinki, Finland
Deepayan Sarkar
2006-Jan-11 16:22 UTC
[R] how to obtain "par(ask=TRUE)" with trellis-plots
On 1/11/06, Leo G伱伡rtler <leog at anicca-vijja.de> wrote:> Dear alltogether, > > how can a delay like possible with par(ask=TRUE) be attained while using > trellis-plots within a loop or something like that? > the following draws each plot without waiting for a signal > (mouse-klick), so par() does not work for that: > > library(nlme) > for(i in 1:3) > { > fitlme <- lme(Orthodont) > par(ask=TRUE) # does not work with trellis.... > print( plot(augPred(fitlme)) ) > }See ?grid.prompt in the grid package. To use it you can either attach grid, or do grid::grid.prompt(TRUE) Deepayan -- http://www.stat.wisc.edu/~deepayan/