Page 1 of 1

apollo_validateInputs issue when providing an apollo_draws object

Posted: 05 Jul 2023, 10:32
by unraton
Hi,

I was trying some estimation on different models for which I have defined different apollo_draws objects.
Using "apollo_validateInputs" and providing the apollo_draws object give the error:

Error in length(apollo_draws) && is.na(apollo_draws) :
'length = 8' in coercion to 'logical(1)'

I think it came from apollo_validateInput line 131 (in the github repository):
if(length(apollo_draws) && is.na(apollo_draws)) apollo_draws <- tryCatch( get("apollo_draws", envir=globalenv()), error=function(e) NA )
Where I believe a "==1" is missing after "length(apollo_draws)".

I've worked around this by using a modified function.
Not providing any apollo_draws argument and having the object named apollo_draws in the environment would have also worked.

I don't seem to have seen this error reported by another user and wanted to let you know before a next update.

Thank you for your work.

Sorry for my frenchized English.
Tanguy

Re: apollo_validateInputs issue when providing an apollo_draws object

Posted: 05 Jul 2023, 14:45
by stephanehess
Tanguy

well spotted. I've fixed this in the development version - you can download it from http://apollochoicemodelling.com/code.html

Best wishes

Stephane

Re: apollo_validateInputs issue when providing an apollo_draws object

Posted: 07 Jul 2023, 08:26
by unraton
I've just installed the development version and it works fine.

Thank you Spehane!

Tanguy