Skip to content

Commit

Permalink
fix lambdaTrue returned as matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarah Endicott committed Oct 17, 2024
1 parent 8cac513 commit 5c81550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/caribouPopGrowth.R
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ caribouPopGrowth <- function(N0,
}

lamBits = names(rr)[grepl("lam",names(rr))]
rr$lambdaTrue=matrixStats::rowCumprods(as.matrix(subset(rr,select=lamBits)),na.rm=T)^(1/length(lamBits)) #geometric mean
rr$lambdaTrue=matrixStats::rowProds(as.matrix(subset(rr,select=lamBits)),na.rm=T)^(1/length(lamBits)) #geometric mean
rr=subset(rr,select=setdiff(names(rr),lamBits))
rr$lambda = lambdaE
rr$N=N
Expand Down

0 comments on commit 5c81550

Please sign in to comment.