You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see in your simulations you are choosing to maintain stochasticity in the survey (single.transect.set=FALSE), yet you do not introduce stochasticity in the population process (via load.data=TRUE). I understand the interest of speeding the simulations, but the inconsistent treatment of stochasticity is unusual--probably best to allow stochasticity to operate both upon the survey and the animals.
Secondly, good programming practice does not use concatenation within loops because of inefficiency (http://www.r-bloggers.com/faster-for-loops-in-r/). Your loop over truncation distances uses c(sims, sim). However, you know the number of elements this list will have:
sims <- vector("list", length(Trun.dists))
so allocate that space prior to entering the loop and use the list element operator [[]] to store each of your simulation objects. That will make the final loop more tidy.
The text was updated successfully, but these errors were encountered:
@Kieran-96
I see in your simulations you are choosing to maintain stochasticity in the survey (
single.transect.set=FALSE
), yet you do not introduce stochasticity in the population process (viaload.data=TRUE
). I understand the interest of speeding the simulations, but the inconsistent treatment of stochasticity is unusual--probably best to allow stochasticity to operate both upon the survey and the animals.Secondly, good programming practice does not use concatenation within loops because of inefficiency (http://www.r-bloggers.com/faster-for-loops-in-r/). Your loop over truncation distances uses
c(sims, sim)
. However, you know the number of elements this list will have:so allocate that space prior to entering the loop and use the list element operator
[[]]
to store each of your simulation objects. That will make the final loop more tidy.The text was updated successfully, but these errors were encountered: