sample.map: Plot The Geographic Location of Samples

Description Usage Arguments Details Note Author(s) See Also Examples

Description

This function plot the number of samples collected from different locations that are DISTANT from each other, e.g. samples that collected from distant cities. This function is similar but not the same as sample.locations and sample.sites. The plot will also show the sample size of each location.

Usage

1
2
3
4
sample.map(meta, siteID="City", maptype="roadmap",
           shape=16, colour=c("red", "blue"),
           lat="Latitude", lon="Longitude", zoom=3,
           file=NULL, ext=NULL, width=10, height=10)

Arguments

meta

the OTU table to be used.

siteID

IDs of sampling sites for each unique pair of longitude and latitude.

maptype

maptype to use, see also get_map.

shape

shape to be used, default is 16 (solid round dot).

colour

smooth gradient between two colours, default is c("red", "blue")

lat

latitude of each sampling location

lon

longitude of each sampling location

zoom

map zoom, an integer from 3 (continent) to 21 (building). see also get_map.

file

the file path where the image should be created (see ?RAM.plotting).

ext

the file type to be used; one of "pdf", "png", "tiff", "bmp", "jpg", or "svg".

height

the height of the image to be created (in inches).

width

the width of the image to be created (in inches).

Details

Please note that this function is getting map information using either the Google Maps API or the OpenStreetMap API, and your usage is subject to the terms of those APIs.

Note

If you are getting a 403/503 error, that likely means that the current map provider is currently unavailable. Try calling the function again in a few hours. If you get a warning message of the form "Removed X rows containing missing values (geom_point).", this means that the current zoom level is too high to display some or all of the points. Try using a lower value forzoom.

Author(s)

Wen Chen.

See Also

sample.locations, sample.sites

Examples

1
2
3
4
5
data(meta)
## Not run: 
sample.map(meta=meta, zoom=8)

## End(Not run)

RAM documentation built on May 2, 2019, 3:04 p.m.