[R] problem with integrate()

Rainer M Krug rkrug at sun.ac.za
Thu Jun 22 13:47:11 CEST 2006


Hi

System:
Linux, SuSE 10
R 2.3.0

I try to do the following

> ip <- function(x) 1240*dip(x, 0.88)
> iip <- function(x) integrate(ip, x - 0.045, x + 0.045)$value
> f <- integrate(iip, 10, 100)
Error in integrate(iip, 10, 100) : evaluation of function gave a result
of wrong length

How can I solve this?

Thanks

Rainer



-- 
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)

Department of Conservation Ecology and Entomology
University of Stellenbosch
Matieland 7602
South Africa

Tel:		+27 - (0)72 808 2975 (w)
Fax:		+27 - (0)21 808 3304
Cell:		+27 - (0)83 9479 042

email:	RKrug at sun.ac.za
      	Rainer at krugs.de



More information about the R-help mailing list