if (FALSE) {
id <- c(1, 2, 3, 4)
scientificName <- c(
"Rhinella major", "Scinax ruber",
"Siparuna guianensis", "Psychotria vellosiana"
)
decimalLatitude <- c(63.43333, -14.43333, -41.90000, -46.69778)
decimalLongitude <- c(-17.90000, -67.91667, -13.25000, -13.82444)
country <- c("BOLIVIA", "bolivia", "Brasil", "Brazil")
x <- data.frame(
id, scientificName, decimalLatitude,
decimalLongitude, country
)
# Get country code
x <- bdc_country_standardized(data = x, country = "country")
bdc_coordinates_transposed(
data = x,
id = "id",
sci_names = "scientificName",
lat = "decimalLatitude",
lon = "decimalLongitude",
country = "country_suggested",
countryCode = "countryCode",
border_buffer = 0.2,
save_outputs = FALSE
)
}
Run the code above in your browser using DataLab