STdiag.measure: Hand measures on a structure time diagram

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

Description

This function allows to extract the coordinates of a point, a line or a region of a structure time diagram.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
STdiag.measure(stdiag,
    type=c("point","line"),
    region=FALSE,
    range=3.3,
    pch=21,
    lwd=3,
    col.line=1,
    col='white',
    fill=1,
    cex=1.2)

Arguments

stdiag

The plot returned by STdiag.

type

Object to identify, either "point" or "line".

region

TRUE / FALSE, extract a region of the plot.

range

Factor of the mean distance between two coordinates to define the region to extract.

pch,lwd,col.line,col,fill,cex

Graphical parameters of the points and line superimposed on the diagram.

Details

This function allows to extract the coordinates of a point, a line or a region of a structure time diagram. If region=TRUE, the points to return are determined by the range of the region. The parameter range defines this range. If the wanted point coordinates are x and y and the original data are data, the region is defined by x in x - range * mean(diff(unique(data$x))) and x + range * mean(diff(unique(data$x))) and y in y - range * mean(diff(unique(data$y))) and y + range * mean(diff(unique(data$y))).

Value

If region is FALSE, returns a data frame with the x, y and z coordinates of the points selected and the index of the corresponding line in the original table, and (if type="l") the slope of the line plotted.

If region is TRUE, returns a LIST where

selection

is the same data frame as described above

region

is the subset of the original data included in the region extracted.

Author(s)

Vincent Le Bourlot

See Also

STdiag

Examples

1
2
# stdiag=STdiag(sample, log=TRUE)
# STdiag.measure(stdiag,"p",TRUE,range=5)

STdiag documentation built on May 2, 2019, 4:58 p.m.