[R] loop in optim

Berend Hasselman bhh at xs4all.nl
Wed Jul 6 11:46:17 CEST 2011


EdBo wrote:
> 
> You are right Joshua.
> 
> I changed the code because I failed to understand how you attached the
> full data set. How you made the data part of your code.
> 
> I am new to R so I am used to one way of attaching data(the way I redone
> it).
> 

You don't need to "attach" the data by using attach().
You read the data into an object afull and then select the part you need and
store that in object a.

BTW: shouldn't the for (i in 1:4) be for (i in 1:3) if I understand the
original question correctly?

Berend

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



More information about the R-help mailing list