Skip to content

Commit

Permalink
Merge pull request #17 from tati-micheletti/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
ianmseddy authored Oct 30, 2023
2 parents 31581cc + 554389c commit 6f81b21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Type: Package
Title: Utilities for Working With the 'fireSense' Group of 'SpaDES' Modules
Description: Utilities for working with the 'fireSense' group of 'SpaDES' modules.
Date: 2023-10-13
Version: 0.0.5.9052
Version: 0.0.5.9053
Authors@R: c(
person("Jean", "Marchal", email = "[email protected]",
role = c("aut")),
Expand Down
5 changes: 5 additions & 0 deletions R/makeLociList.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ makeLociList <- function(ras, pts, idsCol = "FIRE_ID", dateCol = "YEAR", sizeCol
"m2" = 1,
stop("Must provide sizeColUnits either ha or m2")
)
#Check if loci sizes are numeric, otherwise the rescaling fails
if (!inherits(x = lociDF$size, what = "numeric")){
warning(paste0("Fire sizes were classified as ", class(lociDF$size),". Converting to numeric."))
lociDF[, size := as.numeric(size)]
}
set(lociDF, NULL, "size", round(lociDF$size / (prod(res(ras)) / divisor), 0))

for (index in colnames(lociDF)) {
Expand Down

0 comments on commit 6f81b21

Please sign in to comment.