Hi,
I am currently working on a Custom Dialog for running explicit R code.
I would like to have a Number Control that is not a required field or has a default value. For example, it could be a field where a user can set a seed for a random number generator. The user can either leave it blank, which will mean no seed is set, or enter in a number for the seed. The documentation states that when "the run time value of the number control is empty, then the number control does not generate any command syntax".
I am at a loss as to how to deal with a Number Control in R when no syntax is sent and not get an error. If the identifier is %%seed%% (and using %%ThisValue%%), I have tried wrapping %%seed%% in a tryCatch block, checking if it exists, assigning it to a variable and checking for errors, but none are working. What I would like to achieve in my R code, is if %%seed%% has a value, set the seed with that number, but if not, do not set a seed.
Any help on how to deal with this situation would be much appreciated.
Many thanks,
Adam
------------------------------
Adam Lund
------------------------------