Skip to content

Commit

Permalink
fix longer popn vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
atyre2 committed Mar 1, 2019
1 parent 8763f98 commit d782538
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tidypop
Title: Tidy Interface to Single Species Population Models
Version: 0.0.0.9000
Version: 0.0.0.9001
Authors@R: person("Drew", "Tyre", email = "[email protected]", role = c("aut", "cre"))
Description: What the package does (one paragraph).
Depends: R (>= 3.5.1)
Expand Down
2 changes: 1 addition & 1 deletion R/iterator.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ iterate_pop <- function(N0 = NULL, parms = NULL, popfun = NULL){
# Now we "loop" and calculate N for each time
# pass N[,] as a matrix to accomodate
for (i in seq_along(parms$t[-last_t])){
N[i+1,] <- do.call(popfun, c(N0=N[i,], as.list(parms[i,])))
N[i+1,] <- do.call(popfun, c(N0=list(N[i,]), as.list(parms[i,])))
}
if(!is.null(names(N0))){
# fix column names here -- if done before do.call() c() concatenates colnames
Expand Down

0 comments on commit d782538

Please sign in to comment.