[R] lattice wireframe within a loop ???

Thomas Roth (geb. Kaliwe) hamstersquats at web.de
Wed Jun 24 13:08:05 CEST 2009


Hi,

I have the following problem. Calling wireframe within a loop results 
into an empty window(s)

#generate some data
temp = expand.grid(A = 1:3,B = 1:3)
temp = cbind(temp, y1 = rnorm(9))
temp = cbind(temp, y2 = runif(9))


#plot y1 and y2 in two different windows
for(i in 1:2)
{
wireframe(y1 ~ A*B, temp, shade =T)
windows()
wireframe(y2 ~ A*B, temp, shade =T)
}


#However, calling it twice outside a loop works?

wireframe(y1 ~ A*B, temp, shade =T)
windows()
wireframe(y2 ~ A*B, temp, shade =T)


Obviously i'm missing something. How can i call wireframe more than one 
time in a loop and get a wireframe?


Greetings

Thomas Roth




More information about the R-help mailing list