Skip to content
Back to formatted view

Raw Message

Message-ID: <1354293653423-4651455.post@n4.nabble.com>
Date: 2012-11-30T16:40:53Z
From: faeriewhisper
Subject: loop function and integrate?
In-Reply-To: <1354288119614-4651436.post@n4.nabble.com>

Now i've managed to do this:

funcs <- list()
funcs[]

# loop through to define functions
for(i in 1:ib-1){

    # Make function name
    funcName <- paste( 'func', i, sep = '' )

    # make function
    func = paste('function(x){sin(x + a[', i,'])))}',sep = '')

    funcs[[funcName]] = eval(parse(text=func))
  

    }
end

but still cant apply the integrate in a loop for all the different
functions..... :/
help me out guys.... pretty please :)



--
View this message in context: http://r.789695.n4.nabble.com/loop-function-and-integrate-tp4651436p4651455.html
Sent from the R help mailing list archive at Nabble.com.