# \donttest{
# Match coordinates using vectors
matched_data <- matchDOSE(lat = c(19.4326, 51.5074),
long = c(-99.1332, -0.1276))
# Match coordinates using a dataframe
df <- data.frame(ID = 1:2,
latitude = c(19.4326, 51.5074),
longitude = c(-99.1332, -0.1276))
matched_data_df <- matchDOSE(df = df,
lat_col = "latitude",
long_col = "longitude")
# Match coordinates for a specific year
matched_data_2019 <- matchDOSE(lat = c(19.4326),
long = c(-99.1332),
years = 2019)
# Match coordinates with known countries
matched_data_countries <- matchDOSE(lat = c(19.4326, 51.5074),
long = c(-99.1332, -0.1276),
countries = c("MEX", "GBR"),
format_countries = "iso3c")
# }
Run the code above in your browser using DataLab