DistanceDevelopment / Distance

Simple distance sampling analysis
GNU General Public License v3.0
9 stars 8 forks source link

`summarise_ds_models` spits error when dealing with uniform without adjustments #180

Open erex opened 6 months ago

erex commented 6 months ago

Question from list on 18Mar24 about an error message:

Minimum reproducible example

library(Distance)
data(ducknest)
x <- ds(ducknest, key="unif", adjustment = NULL)
summarize_ds_models(x)
Error in `[.data.frame`(res, , 4:7) : undefined columns selected
erex commented 5 months ago

Debugging with MRE above:

Line that throws the error is 110 in summarize_ds_models.R. res data frame contains only 6 columns, hence res[, 4:7] results in undefined column message.