Skip to content

Commit

Permalink
Merge pull request #28 from ecknight/main
Browse files Browse the repository at this point in the history
Species list filter bug on wt_qpad_offsets
  • Loading branch information
alexmacphail authored Oct 17, 2023
2 parents 789683b + b4d03c9 commit 5c868ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions R/convenience-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ wt_format_occupancy <- function(data,
#' }
#' @return An object of class unmarkedFrameOccu. See `unmarked::unmarkedFrameOccu` for details.

wt_qpad_offsets <- function(data, species = "all", version = 3, together=TRUE){
wt_qpad_offsets <- function(data, species = c("all"), version = 3, together=TRUE){

#Make prediction object
cat("Extracting covariates for offset calculation - be patient")
Expand All @@ -431,7 +431,7 @@ wt_qpad_offsets <- function(data, species = "all", version = 3, together=TRUE){
load_BAM_QPAD(version)

#Make the species list
if(species=="all") spp <- sort(intersect(getBAMspecieslist(), colnames(data))) else spp <- species
if("all" %in% species) spp <- sort(intersect(getBAMspecieslist(), colnames(data))) else spp <- species

#Set up the offset loop
cat("\nCalculating offsets")
Expand All @@ -440,7 +440,7 @@ wt_qpad_offsets <- function(data, species = "all", version = 3, together=TRUE){

#Make the offsets
for (i in 1:length(spp)){
cat(spp[i], "\n")
cat("\n", spp[i])
o <- .make_off(spp[i], x)
off[,i] <- o$offset
}
Expand Down
2 changes: 1 addition & 1 deletion man/wt_qpad_offsets.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5c868ab

Please sign in to comment.