# NOT RUN {
#simulate bias grid, one degree resolution, 10% error on a 1000 records dataset
#simulate biased fraction of the data, grid resolution = 1 degree
#simulate non-biased fraction of the data
bi <- sample(3 + 0:5, size = 100, replace = TRUE)
mu <- runif(3, 0, 15)
sig <- runif(3, 0.1, 5)
cl <- rnorm(n = 900, mean = mu, sd = sig)
lon <- c(cl, bi)
bi <- sample(9:13, size = 100, replace = TRUE)
mu <- runif(3, 0, 15)
sig <- runif(3, 0.1, 5)
cl <- rnorm(n = 900, mean = mu, sd = sig)
lat <- c(cl, bi)
#add biased data
inp <- data.frame(decimallongitude = lon,
decimallatitude = lat,
dataset = "test")
#run test
# }
# NOT RUN {
cd_round(inp, value = "dataset")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab