HD2i / n1-simulator

Simulator for N-of-1 stochastic time-series model
5 stars 2 forks source link

Run-in and wash-out period must be > 0 #1

Closed zimmeee closed 5 years ago

zimmeee commented 5 years ago

I just came across this issue using the R package, which throws an error if you set the run-in (tc_in) or wash-out (tc_out) parameters to 0.

It would be desirable if we could set those values to 0, but in the meantime, we should do some basic error checking on the front-end so it doesn't crash our server.

mrjonesolmedo commented 5 years ago

Good catch!

The Shiny app does input validation (min value = 1) when using the clickable arrows in the numeric input boxes. However, it doesn't validate when typing the value, and as a result disconnects the session when typing in a value of 0.

There is an open issue in Shiny regarding input validation: https://github.com/rstudio/shiny/issues/927.

I'll look into doing manual input validation instead.

mrjonesolmedo commented 5 years ago

Implemented input validation for the following parameters: