Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-write / updates / testing of constantDensitySampling() #50

Open
dylanbeaudette opened this issue Nov 8, 2022 · 0 comments
Open

re-write / updates / testing of constantDensitySampling() #50

dylanbeaudette opened this issue Nov 8, 2022 · 0 comments

Comments

@dylanbeaudette
Copy link
Member

Documentation is out of date, terra objects / methods are now used.

Test / fix bugs:

library(spData)
library(sharpshootR)
library(terra)

# sample CONUS
data("us_states")
us_states <- st_transform(us_states, 5070)
us_states$id <- 1:nrow(us_states)

us_states <- vect(us_states)

s <- lapply(us_states$NAME, function(i) {
  constantDensitySampling(us_states[us_states$NAME == i, ], polygon.id = 'id', n.pts.per.ac = 0.00001, min.samples = 1, sampling.type = 'random')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant