Skip to content

Commit

Permalink
decreasing id raster digits
Browse files Browse the repository at this point in the history
  • Loading branch information
danddr committed Jan 31, 2024
1 parent 140c9a2 commit 6919a56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/paSampling.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ paSampling <- function (env.rast=NULL, pres = NULL, thres = 0.75, H = NULL, grid
dt <- terra::as.data.frame(rpc$PCs[[c("PC1", "PC2")]], xy = TRUE)
dt$myID <- seq_len(nrow(dt))
id <- dt[, c("x", "y", "myID")]
id_rast <- terra::rast(id, digits = 10, type = "xyz")
id_rast <- terra::rast(id, digits = 3, type = "xyz")
id_rast <- terra::resample(id_rast, env.rast)
terra::ext(id_rast) <- terra::ext(env.rast)
PC12 <- c(rpc$PCs[[c("PC1", "PC2")]], id_rast)
Expand Down

0 comments on commit 6919a56

Please sign in to comment.