Re: [R] R object as a function

From: Thomas Steiner <>
Date: Tue, 22 Jan 2008 12:51:14 +0100

Okay, let me try to better say what I meant:

myfun1<-function(x=5,pa) {

myfun2<-function(x=5,param,myfunk1) {


  integ=integrate(f=myfun2,lower=lo,upper=up,param=pars2,myfunk1=mf)   return( 2*integ$value )


So the function myfun2 will be integrated and has a function (myfunk1) itself as an argument.
Why is this not possible?

PS: the "x=5" and "pa=8*" has no influence... mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 22 Jan 2008 - 11:55:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 Jan 2008 - 12:30:08 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive