if(requireNamespace("rnaturalearthdata")){
library(magrittr)
# Load in the test dataset
beesRaw <- BeeBDC::beesRaw
# For the sake of this example, use the testChecklist
system.file("extdata", "testChecklist.rda", package="BeeBDC") |> load()
# For real examples, you might download the beesChecklist from FigShare using
# [BeeBDC::beesChecklist()]
beesRaw_out <- countryOutlieRs(checklist = testChecklist,
data = beesRaw %>%
dplyr::filter(dplyr::row_number() %in% 1:50),
keepAdjacentCountry = TRUE,
pointBuffer = 1,
scale = 50,
stepSize = 1000000,
mc.cores = 1)
table(beesRaw_out$.countryOutlier, useNA = "always")
} # END if require
Run the code above in your browser using DataLab