data <- data.frame(
scientificName = "Mexacanthina lugubris",
decimalLongitude = c(-117, -117.8, -116.9),
decimalLatitude = c(32.9, 33.5, 31.9),
temperature_mean = c(12, 13, 14),
temperature_min = c(9, 6, 10),
temperature_max = c(14, 16, 18)
)
env_layers <- c("temperature_mean", "temperature_min", " temperature_max")
result_list <- distance_calc(data,
latitude = "decimalLatitude",
longitude = "decimalLongitude",
env_layers,
itr = 100,
k = 3
)
Run the code above in your browser using DataLab