Plots the proportion of time-selected hulls over 's'

Description

Plots the proportion of time-selected hulls over 's'

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
lxy.plot.ptsh(lxy, id = NULL, ptsh.idx = NULL, use.nn = FALSE, k = NULL,
  r = NULL, a = NULL, slim = NULL, boxplot = FALSE, overlay = FALSE,
  desc = c(0, 1, 3)[2], cex.desc = 0.8, col.desc = "darkgreen",
  title = NULL, title.show = TRUE, legend = c("none", "bottomright",
  "bottom", "bottomleft", "left", "topleft", "top", "topright", "right",
  "center")[2], mar = c(3, 3, if (title.show) 2.8 else 0.7, 0.5),
  mgp = c(1.8, 0.5, 0), figs.per.page = NULL, panel.num = NULL,
  panel.num.inside.plot = !title.show, png.dir = NULL,
  png.dir.make = TRUE, png.width = 800, png.height = png.width,
  png.overwrite = TRUE, png.pointsize = 12 + (png.width - 480)/80,
  lo.save = TRUE, ...)

Arguments

lxy

A LoCoH-xy object

id

The name(s) of individuals to plot

ptsh.idx

The index number of the saved ptsh table to use (ignored if use.nn=TRUE)

use.nn

Whether to create the plot based on nearest neighbor sets (as opposed to saved ptsh tables, see Details). T/F.

k

Value for the k method if creating the plot based on nearest neighbor tables (ignored if use.nn=FALSE)

r

Value for the r method if creating the plot based on nearest neighbor tables (ignored if use.nn=FALSE)

a

Value for the a method if creating the plot based on nearest neighbor tables (ignored if use.nn=FALSE)

slim

The lower and upper bounds for s, two-element numeric vector

boxplot

Display boxplots of the range of s-values for each target ptsh for multiple individuals. T/F

overlay

Overlay curves for multiple individuals. T/F

desc

Which side to display automatically generated desciptive text (e.g. caption). 0=none, 1=bottom, 3=top.

cex.desc

The expansion factor for the descriptive text. Numeric value.

col.desc

The color of the descriptive text. Color value.

title

The title to be displayed. Character. If NULL a title will be constructed.

title.show

Whether to show the title. T/F.

legend

A character object specifying where to put the legend (ignored when use.nn=TRUE)

mar

The plot margins. A four item numeric vector

mgp

The distance away from the edge of the plot for the 1) label, 2) tick marks, and 3) axis line. A three-item numeric vector

figs.per.page

The number of plots per page.

panel.num

A number or letter to display in the upper left hand corner of the plot when the plot will be used as part of a multi-frame graphic (as in publications). Character

panel.num.inside.plot

Whether to display panel.num inside the plot area itself, as opposed to the title area. T/F

png.dir

The directory for a PNG file (filename will be constructed automatically).

png.dir.make

Whether to create png.dir if it doesn't exist. T/F

png.width

The width of the PNG image

png.height

The height of the PNG image

png.overwrite

Whether to overwrite an existing PNG file if it exists. T/F

png.pointsize

The pointsize (in pixels) for the PNG image, equivalent to the height or width of a character in pixels (increase to make labels appear larger)

lo.save

Change layout

...

Additional parameters that will be passed to the plot function

Details

This function will plot the proportion of total hulls that are 'time-selected'. Time-selected means all of the nearest neighbors are were sampled sequentially in time. This is one end of the spectrum as far as nearest neighbor identification goes, the other being space-selected (i.e., time has no bearing). The s parameter in the TSD equation determines the degree to which time plays a role in the point-to-point 'distance'. When s=0, time plays no role in TSD and TSD is equivalent to Euclidean distance. As s increases, time plays a bigger and bigger role until eventually nearest neighbor selection is equivalent to selection points based only on their separation in time.

In order to plot the proportion of time-selected hulls (ptsh), nearest neighbors must have already been identified. This can be done in one of two ways. The lxy.ptsh.add function will compute ptsh for different values of s using a random sample of points (to save time), automatically picking values of s such that ptsh is close to target values provided by the user. Alternately, one can identify nearest neighbors for different values of s using lxy.nn.add and then run this function with use.nn=TRUE. The main difference between lxy.ptsh.add and lxy.nn.add is that lxy.ptsh.add finds nearest neighbors for a random sample of points, and doesn't actually save the nearest neighbor information for individual points, whereas lxy.nn.add identifies and saves nearest neighbor information for each and every point.

Value

A list of lists, one for each plot containing the filename (NULL if no png made), the image dimensions (or NULL), the descriptive text, the id, and a matrix of the values

See Also

lxy.ptsh.add, lxy.nn.add

Examples

1
2
3
# data(toni.lxy)
# toni.lxy <- lxy.ptsh.add(toni.lxy)
# lxy.plot.ptsh(toni.lxy)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.