Skip to content

Commit

Permalink
Update XX_sample_50_km_buffer_and_make_grids.R
Browse files Browse the repository at this point in the history
  • Loading branch information
r0gawa committed Dec 28, 2024
1 parent 7fd7fa4 commit 5bead88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Code/XX_sample_50_km_buffer_and_make_grids.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ for(i in 1:length(uni_spp)){ # loop through each species
filter(species %in% sp) %>% # subset to only the species of interest
vect() # convert to a SpatVector

e <- terra::extract(ras, unique(sp_dat), cells = TRUE) %>% # extract the cells
e <- terra::extract(ras, sp_dat, cells = TRUE) %>% # extract the cells
count(cell) # count the number of cells

rasx[e$cell] <- 1 # detection = 1; nondetection = 0
Expand Down

0 comments on commit 5bead88

Please sign in to comment.