Skip to content

sapply error produced by grid search

2 messages · Patel, Shreena, Berend Hasselman

#
On 16-05-2013, at 17:31, "Patel, Shreena" <s.patel10 at lancaster.ac.uk> wrote:

            
It is the problem.
The first argument of sapply is X. Your function bc.fit has an argument X which you explicitly set to x.
So sapply takes lambda as the second argument which is FUN (function).

So rename your bc.fit arguments to something else: e.g. (x,y,z) or (X1,Y1,Z1).

And reread the documentation of sapply. It's all there.

Berend