[R] rsolnp- Error (Help!)
tushar_kul
tuskul at gmail.com
Mon Sep 28 22:51:36 CEST 2009
Thanks, Ravi. I have attached the code again. (Still the same error)
http://www.nabble.com/file/p25652730/OptTS.txt OptTS.txt
Ravi Varadhan wrote:
>
> I was trying to run your code, but it seems like you haven’t specified the
> parameter called `Strk', so I was unable to run it. Can you send a fully
> reproducible code?
>
> jholtman wrote:
>>
>> It means that your expression "max(tt[2] - 10 * tol, nineq)" is returning
>> NA:
>>
>> Notice I get the same error:
>>
>>> if (1==1)1
>> [1] 1
>>> if (NA == 1) 1
>> Error in if (NA == 1) 1 : missing value where TRUE/FALSE needed
>>
>> Check your script and see why it is NA. you might need:
>>
>> max(tt[2] - 10 * tol, nineq, na.rm=TRUE)
>>
>> If your data has NAs.
>>
>> On Sun, Sep 27, 2009 at 5:29 PM, tushar_kul <tuskul at gmail.com> wrote:
>>>
>>> Hi
>>>
>>> I am relatively new to R and was trying to run an optimization problem
>>> using
>>> rsolnp. I am getting an error which seems to be not related to my
>>> construct
>>> of the optimization equations.
>>>
>>> Error in if (max(tt[2] - 10 * tol, nineq) <= 0) rho = 0 :
>>> missing value where TRUE/FALSE needed
>>>
>>> I have attached the file code.
>>>
>>> I would greatly appreciate any help.
>>>
>>> Many thanks
>>>
>>> http://www.nabble.com/file/p25637806/OptTS.txt OptTS.txt
>>>
>>>
>>> --
>
--
View this message in context: http://www.nabble.com/rsolnp--Error-%28Help%21%29-tp25637806p25652730.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list