Skip to content

Commit

Permalink
Correct datatype in writeRaster in BIOMOD_Projection (depending on on…
Browse files Browse the repository at this point in the history
…_0_1000 parameter)
  • Loading branch information
MayaGueguen committed Aug 31, 2022
1 parent 5ae8702 commit b229211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/BIOMOD_Projection.R
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ BIOMOD_Projection <- function(bm.mod,
save(list = nameProjSp, file = saved.files, compress = compress)
} else if(do.stack) {
writeRaster(x = get(nameProjSp), filename = saved.files,
overwrite = TRUE, datatype = "INT2S", NAflag = -9999)
overwrite = TRUE, datatype = ifelse(on_0_1000, "INT2S", "FLT4S"), NAflag = -9999)
} else {
saved.files = unlist(proj)
}
Expand Down

0 comments on commit b229211

Please sign in to comment.