Skip to content

Commit

Permalink
fix(occurrenceChange): correct the growth rate function
Browse files Browse the repository at this point in the history
The growth rate function incorrectly used number of years rather than number of periods (in this case nyr-1).

related to #251
  • Loading branch information
GPowney committed Jun 9, 2023
1 parent 2973f6d commit 5a6a993
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/occurrenceChange.r
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ occurrenceChange <- function(bayesOut, firstYear=NULL, lastYear=NULL, change = '


if(change == 'growthrate'){
nyr <- length(years)
nyr <- length(years)-1
first <- years[1]
last <- years[length(years)]
res_tab <- data.frame(occ_it[, colnames(occ_it) == first],
Expand Down

0 comments on commit 5a6a993

Please sign in to comment.