Description Usage Arguments Value Examples
View source: R/map_locations.R
map_locations
takes the coordinates from up to two location tables and plots them on two maps with different zoom.
1 | map_locations(data, compare, zoom1 = 11, zoom2 = 8, vertical = FALSE)
|
data |
Location table with decimal degree coordinates that you wish to plot. Only DwC terms are recogniced (decimalLatitude and decimalLongitude) |
compare |
Location table with decimal degree coordinates that you wish to plot alongside the 'data'. |
zoom1 |
Resolution of the smallest scale map. Defaults to 11. Increasing the resolutions also increases computation time. |
zoom2 |
Resolution of the largest scale map. Defaults to 8. Increasing the resolutions also increases computation time. |
vertical |
Should the plots be arranged vertically (T/F)? Defults to FALSE. |
A map (gtable)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
# Plotting coordinates from one dataset:
decimalLatitude <- c(59.02936, 59.03352, 59.04758) #note that the name must be DwC
decimalLongitude <- c(7.278987, 7.267469, 7.184718)
myData <- data.frame(decimalLatitude, decimalLongitude)
map_locations(data = myData)
map_locations(data = myData, vertical = T)
# Add another location table to compare against:
decimalLatitude2 <- c(59.03347)
decimalLongitude2 <- c(7.268134)
myData2 <- data.frame(decimalLatitude = decimalLatitude2,
decimalLongitude = decimalLongitude2)
map_locations(data = myData, compare = myData2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.