[R] Script that runs under R(win) failing under R(linux)

Stuart Leask stuart.leask at nottingham.ac.uk
Mon Feb 4 12:22:38 CET 2002


Hello there.

I have a script (see below) that runs in Rv1.4.0  for windows, but not in
Rv1.4.0 for linux (not the current versions, I know, but close).

In the linux version, the script is interrupted by a prompt
"Display all 101 possibilities? (y or n)"
that stops the script working properly. This prompt doesn't appear when
running the script in R for windows.

Is there some way of turning this prompt off so that I can run this script
in the linux version?

Stuart

Dr Stuart Leask MA MRCPsych, Clinical Lecturer in Psychiatry
University of Nottingham Dept of Psychiatry, Duncan Macmillan House
Porchester Road, Nottingham. NG3 6AA. UK
http://www.nottingham.ac.uk/psychiatry/staff/sjl.html

Linux version console:

...
>
> plot(RB,R)
> i<-0
> while(i<30){
+ Ri<-lag(R,i)
+ L0<-lag(L,0)
+ M<-as.data.frame(ts.intersect(Ri,L0))
+ cor.i<-cor(M$Ri,M$L0)
+ if(abs(cor.i)<0.01)
+ {
+ RBi<-100*(M$Ri-M$L0)/M$Ri+M$L0)
+
Display all 101 possibilities? (y or n)
+ es(lowess(RBi,M$Ri))
+ }
+ i<-i+1
+ }
Error: couldn't find function "es"
> points(lowess(RB,R))
>
...

Windows version console (no prompt, so all runs smoothly):

...
>
> plot(XY)
> i<-0
> while(i<30){
+  Ri<-lag(R,i)
+  L0<-lag(L,0)
+  M<-as.data.frame(ts.intersect(Ri,L0))
+  cor.i<-cor(M$Ri,M$L0)
+  if(abs(cor.i)<0.01)
+  {
+  RBi<-100*(M$Ri-M$L0)/(M$Ri+M$L0)
+   lines(lowess(RBi,M$Ri))
+  }
+  i<-i+1
+ }
> points(lowess(RB,R))
>
...

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list