Re: [R] multiple graphics windows open with sessionInfo

2010-07-30 Thread Uwe Ligges



On 29.07.2010 23:29, Erin Hodgess wrote:

Dear R People:

Hello again.  I'm trying to have 3 graphics windows visible
simultaneously.  I set up a zoo series.
Then I plot the original series.  I use the locator function to select
2 values from the original series, which generates a subset of the
original series.

Next, I plot the subset.

The last step is to produce an EWMA chart from the subset series.

Fair enough.  I've tried all sort of things, but can only have 2
graphics windows open with stuff in them.  If I go into the blank
window and maximize it, then it appears.  But other than that, it does
not.



xdate- seq(as.Date(1998-01-01),as.Date(2010-06-30),by=day)
length(xdate)

[1] 4564

xt- zoo(rnorm(4564),order=xdate)
#Here is the function itself:
eplot

function (x)
{
 require(zoo)
 require(qcc)
 windows()
 plot(x)
 z- locator(2,type=l,col=red)
 windows()
 plot(window(x, start = min(z$x), end = max(z$x)))
 windows()
 ewma(window(x, start = min(z$x), end = max(z$x)))
 dev.set(3)
  plot(window(x, start = min(z$x), end = max(z$x)))





Erin,

actually, I do not udnerstand what you want to achieve with the last two 
lines of the function.
Particularly note that dev.set(3) does only work if you have a certain 
amount of open devices once you call the function.


Best,
Uwe



}

sessionInfo()

R version 2.11.1 (2010-05-31)
i386-pc-mingw32

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
States.1252LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
[1] qcc_2.0.1   zoo_1.6-3   proto_0.3-8

loaded via a namespace (and not attached):
[1] dynlm_0.2-3   grid_2.11.1   lattice_0.18-8
strucchange_1.4-0 tcltk_2.11.1  tools_2.11.1  traitr_0.7





Any help would be much appreciated.

Thanks,
Erin




__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] multiple graphics windows open with sessionInfo

2010-07-29 Thread Erin Hodgess
Dear R People:

Hello again.  I'm trying to have 3 graphics windows visible
simultaneously.  I set up a zoo series.
Then I plot the original series.  I use the locator function to select
2 values from the original series, which generates a subset of the
original series.

Next, I plot the subset.

The last step is to produce an EWMA chart from the subset series.

Fair enough.  I've tried all sort of things, but can only have 2
graphics windows open with stuff in them.  If I go into the blank
window and maximize it, then it appears.  But other than that, it does
not.


 xdate - seq(as.Date(1998-01-01),as.Date(2010-06-30),by=day)
 length(xdate)
[1] 4564
 xt - zoo(rnorm(4564),order=xdate)
 #Here is the function itself:
 eplot
function (x)
{
require(zoo)
require(qcc)
windows()
plot(x)
z - locator(2,type=l,col=red)
windows()
plot(window(x, start = min(z$x), end = max(z$x)))
windows()
ewma(window(x, start = min(z$x), end = max(z$x)))
dev.set(3)
 plot(window(x, start = min(z$x), end = max(z$x)))

}
 sessionInfo()
R version 2.11.1 (2010-05-31)
i386-pc-mingw32

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
States.1252LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
[1] qcc_2.0.1   zoo_1.6-3   proto_0.3-8

loaded via a namespace (and not attached):
[1] dynlm_0.2-3   grid_2.11.1   lattice_0.18-8
strucchange_1.4-0 tcltk_2.11.1  tools_2.11.1  traitr_0.7



Any help would be much appreciated.

Thanks,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.