Re: [R] certain number of equations in function depending on parameter

2007-09-24 Thread Moshe Olshansky
Hi Andreas, One possible way would be to create a file containing all your equations (which are written in a loop), then source that file and then use uniroot. Regards, Moshe. --- Andreas Wittmann <[EMAIL PROTECTED]> wrote: > Hello everybody, > > i have the following problem to write a func

[R] certain number of equations in function depending on parameter

2007-09-18 Thread Andreas Wittmann
Hello everybody, i have the following problem to write a function which recognizes depending on the parameter-inputs how many equations for the calculation in the function are needed. Here is an example of my problem: "myfun" <- function(a, b, c, d) { k <- length(a) #here d = 3 for exa