christianparobek / skeleSim

Null models, performance testing, and power estimation with population simulations
3 stars 6 forks source link

shiny crash: @num.per.reps cannot take logical #39

Closed christianparobek closed 8 years ago

christianparobek commented 8 years ago

Under the "General Conf" tab, at the "Number of permutations for significance tests during analysis" box, when I hit the backspace button to replace the 0 with a different number the app crashes with this:

Warning: Error in <Anonymous>: assignment of an object of class “logical” is not valid for @‘num.perm.reps’ in an object of class “skeleSim.params”; is(value, "intOrNum") is not TRUE
Stack trace (innermost first):
    64: <Anonymous>
    63: observeEventHandler [make-skelesim-class.R#42]
     1: shiny::runApp

Surprisingly, the text box above it ("Number of simulation reps") doesn't crash in the same way. I thought tracking down the way these slots are defined in make-skelesim-class.R might highlight the difference, but can't see any reason why num.perm.reps crashes and num.sim.reps doesn't...

christianparobek commented 8 years ago

Same problem for Number of Loci under the Scenario Conf tab, when microsatellites are selected.

christianparobek commented 8 years ago

Same problems under "FastSimCoal Params" > "Growth Rates", the "Vector of growth rates (corresponds to populations)" crashes if anything other than an integer is entered into the box - i.e. decimals ("numeric") or empty (a backspace). Should I be making these separate problems?

stranda commented 8 years ago

As you suggest these all seem like the same kind of problem. Basically I need to coerce numbers to integers because downstream integers are required

stranda commented 8 years ago

made changes, seems to work now