[R] unexpected behaviour of 'curve' function

Guazzetti Stefano Stefano.Guazzetti at ausl.re.it
Fri Nov 26 11:07:29 CET 2004


Dear all, 

curve(x^3*(1-x)^7, from = 0, to = 1)

works as  expected but, omitting the "xlim" or the "to" 
and "from" arguments and calling "curve" more than once:

par(mfrow = c(2,2))
for (i in 1:4)
curve(x^3*(1-x)^7)

gives an expected (al least to me) result.
Note also that a "pu" object is returned by curve

> pu
[1] -0.1802445  1.1802445

The behaviour is reproducible with both  R 2.0.0
and R 2.0.1

I can see that a promise of evaluation of "pu"
is made within curve but I cannot understand completely
what happens.

Thanks in advance, 

Stefano Guazzetti


platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    2              
minor    0.0            
year     2004           
month    10             
day      04             
language R




More information about the R-help mailing list