[S] CoKriging Software

Terje Jorgensen (terjej@imr.no)
Thu, 02 Apr 1998 17:12:30 +0200

Dear S+ Users,

I did not get any feedback on my previous submisssion of this query to the
list so I take the liberty of re-submitting it.

To create animation, I want the result of each plotting command within a
function to be displayed immediately upon completion of that command.
As is, everything is plotted upon exit (return) from the function.

How can I force the immediate display to a graphic window of the result of
a plotting command that is part of a function?

I am running v. 4.0 release 3 for Windows.


test.plot<- function(n)
# Plot three point, one at a time.
# Display each point once plotted.

x<- c(1,2,3)
y<- c(1,2,1)

plot(x,y, type="n")

nobs <- length(x)
for(i in 1:nobs) {
points(x[i], y[i]) # plot one point
pause(n) # and pause for n sec

The pause function was kindly provided by Bert Gunter
pause<- function(n)
start <- proc.time()
while(proc.time() < (start + n)) {
#do nothing
cat("all done\n")

Thanks in advance!

Terje Jorgensen
Gear Section
Institute of Marine Research, Bergen

e-mail: terjej@imr.no

This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news