Learn R Programming

RAM (version 1.2.1.3)

sample.map: Plot The Geographic Location of Samples

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

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.

See Also

sample.locations, sample.sites

Examples

Run this code
data(meta)
## Not run: 
# sample.map(meta=meta, zoom=8)
# ## End(Not run)

Run the code above in your browser using DataLab