DistanceDevelopment / dsims

New simulation R library
1 stars 2 forks source link

Identical models causes error #50

Closed LHMarshall closed 2 years ago

LHMarshall commented 2 years ago

If the user accidentally enters identical models to choose between this causes an error:

Error in detection.results[1, "Pa", i] <- Ave.Pa : 
  replacement has length zero

This also be an issue when we allow users to select adjustment terms (I am uncertain of when Distance allows automatic selection of the number of adjustment terms).

LHMarshall commented 2 years ago

Adjustment terms are not easily available to users at the moment (I made them available in one branch with very little validation for something us developers were investigating) I will therefore add checks for now that apply when adjustment terms are not included which checks that no combination of key function and formulas are repeated. If they are the user will receive an error on creation of the ddf.analysis object.