-
|
Hi, more of an Eidos coding question. I don't seem to be able to use a vector (of floats in this case) as an optional parameter with defaults. I don't know if it's just not possible in Eidos or just me coding this wrongly. e.g.: My issue is with the second parameter Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi! Yes, this is something you can do in R but not in Eidos. Default values have to be simple constants; they cannot involve calculations. So a call to |
Beta Was this translation helpful? Give feedback.
Hi! Yes, this is something you can do in R but not in Eidos. Default values have to be simple constants; they cannot involve calculations. So a call to
c()is not allowed; even something like5+5is not allowed. Typically in this situation I makeNULLbe the default value for the parameter, and then check in the function's script for aNULLvalue and replace it with the desired default. Not great, but it works.