[R] Display execution in a function

From: Sebastien Durand <sebastien.durand_at_UMontreal.CA>
Date: Fri 15 Apr 2005 - 08:57:31 EST


Dear all,

Here is a simplified version of a function I made:

############

plotfunc<-function(x){
#x a vector
cat("please select two points","\n")
plot(x)
points<-locator(2)
return(points)
}

############

Using R version 1.01 for mac os x (aqua GUI)

I would like to know what should I do to make sure that my text line will be printed prior to the drawing of the plot.
I hope you will agree with me that it is not useful to have the plot displayed and R waiting for user input while nothing has yet been displayed for instructions!

Thanks a lot

PS.: I have tried this on both a R version 1.01 and 1.00 and on a G5 dual processor as well as on a powerbook G4

Sebastien Durand

--

______________________________________________
R-help@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
Received on Fri Apr 15 09:02:35 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:11 EST