Open gowachin opened 4 years ago
Another troubleshooting appear if populations in a community don't have the same length. It's the same part (4th) of the summary but in summary.community()
function.
To reproduce it :
butterfly <- population(label = "butterfly", initial_size = 13, growth_rate = 1, capacity = 50)
cats <- list(label = "cats", size = c(1,1.2,1.3,1.4,1.5), time = c(0:4), growth_rate = 1.5, capacity = 24)
cats <- as_population(cats)
wasteland <- community(label = 'wasteland',cats , butterfly )
summary(wasteland)
return error :
Error in ratesv[n] <- v[length(v) - 1]/v[length(v)] :
l'argument de remplacement est de longueur nulle
lapply(X = sizes, FUN = rates_c3, n = gens1) at summary_population.R#522
Issue in summary_population. It depend on the size of the size vector, in the 4th part of the summary (line 172-214 of summary_population.R I think).
Example working with length longer than 4.
Example not working with lenght of 4.
return error and print a partial summary.