plot.wDist {assignR}R Documentation

Plot weighted distance and bearing distributions


Plot the output from wDist, including weighted kernel density distributions for distance and bearing of travel.


## S3 method for class 'wDist'
plot(x, ..., bin = 20, pty = "both", index = c(1:5))



A wDist object


Other arguments to be passed to plot


numeric. Bin width used to generate rose plot of travel bearings, in degrees. Must be a factor of 360.


character. Type of plot to produce. Must be one of “dist”, “bear”, or “both”.


numeric. Which items in x to plot? Numeric vector of up to 5 integers. Values in excess of 5 or exceeding the length of x will be ignored.


For the default pty, two plot panels will be printed to the active graphical device showing the distance and bearing distributions for (up to) the first five samples in wd. If more than five items exist in wd, those beyond the fifth will be ignored and a message returned.

See Also



# load hydrogen isotope data for human hair in North America
d = subOrigData(group = "Modern human", mask = naMap, niter = 100)

# rescale from environmental isoscape to tissue isoscape
r = calRaster(known = d, isoscape = d2h_lrNA, mask = naMap)

# four unknown-origin examples
id = c("A", "B", "C", "D")
d2H = c(-110, -90, -105, -102)
un = data.frame(id,d2H)

# posterior probabilities
pp = pdRaster(r, unknown = un, mask = naMap)

# random collection locations
sites = d$data[sample(seq(length(d$data)), 4),]

# generate a wDist object
wd = wDist(pp, sites)

# plot distributions

# plot bearing distriubtion for sample B with a finer bin size
plot(wd, bin = 5, pty = "bear", index = 2)

[Package assignR version 2.4.0 Index]