data <- data.frame(
scientificName = "Mexacanthina lugubris",
decimalLongitude = c(-117, -117.8, -116.9),
decimalLatitude = c(32.9, 33.5, 31.9),
BO_sstmean = c(12, 13, 14),
BO_sstmin = c(9, 6, 10),
BO_sstmax = c(14, 16, 18)
)
env_layers <- c("BO_sstmean", "BO_sstmin", "BO_sstmax")
res <- ec_flag_outlier(data,
latitude = "decimalLatitude",
longitude = "decimalLongitude",
env_layers,
itr = 100,
k = 3,
geo_quantile = 0.99,
maha_quantile = 0.99
)
data$outlier <- res$outlier
iteration_list <- res$result$list
Run the code above in your browser using DataLab