trace.lim: Visualize lim objects

View source: R/trace.lim.R

trace.limR Documentation

Visualize lim objects

Description

Visualize lim objects as lines for each interval. The lines are time series with the dt (depth/time) being the boundaries of the interval, and an xy intensity is defined as values attributed to the interval.

Usage

trace.lim(
  lim = NULL,
  l = NULL,
  r = NULL,
  id = 1L,
  b = "[]",
  xy = 0,
  order = F,
  decreasingly = F,
  output = T,
  plot = T,
  link = F,
  point = T,
  style = list(),
  close = list(pch = 19),
  open = list(pch = 21, bg = "white"),
  add = F,
  gen = list(xlab = "dt", ylab = "xy")
)

plot_lim(
  dt,
  xy,
  int,
  include,
  link = F,
  point = T,
  style = list(),
  close = list(pch = 19),
  open = list(pch = 21, bg = "white"),
  add = F,
  hz = T,
  gen = list(xlab = "dt", ylab = "xy")
)

Arguments

lim

a list of n left (1st element) and n right (2ndt element) interval limits, of n interval IDs, and of n interval boundary rules (e.g. "[]").

l

the left interval limits (numerical vector of length n).

r

the right interval limits (numerical vector of length n).

id

the interval IDs (numerical or character vector of length n, the default is 1 for each interval). They can be similar for different intervals.

b

the interval boundaries rules: "[]" (or "closed") to include both boundaries points, "][" (or "()" and "open") to exclude both boundary points, "[[" (or "[)","right-open" and"left-closed") to include only the left boundary point, and "]]" (or "(]", "left-open", "right-closed") to include only the right boundary point. The notation is simplified to "[]", "[[", "]]" and "][" only.

xy

the intensity attributed to each interval.

order

whether to order the intervals.

decreasingly

whether the order to set is decreasing.

output

whether to output the results.

plot

whether to plot the results.

link

whether to link all the intervals into one line.

point

whether to add points to the boundaries of each interval.

style

the style of the lines.

close

the style of the points for closed boundaries.

open

the style of the points for open boundaries.

add

whether to add the plot to an existing plot.

gen

general parameters for plot

dt

the boundaries of the intervals as provided by trace.lim.

int

the id of each interval as provided by trace.lim.

include

whether the boundaries of the intervals are included in them, as provided by trace.lim.

hz

whether dt stands for the horizontal axis (the x axis, i.e., the abscissa): in that case it is set a TRUE (this is the default value). Any other value will associate dt with the vertical axis (y axis, i.e., the ordinate)

Value

trace.lim returns a list of 'dt' values (dt stands for depth/time, which corresponds to the boundaries of intervals), 'xy' values (the "intensity" of each interval), 'int' which is an id for each interval, id which is the ids defined in the lim objects (these ids can be similar for different intervals, and therefore define groups of intervals), and 'include' which are boolean (T/F) values whether a boundary of the interval is included in the interval.

See Also

generalities on lim data: as.lim

Examples

lim <- as.lim(l = c(0,6,4,6,50), r = c(1,5,6,9,8),
              b = c("[[", "]]", "[[", "]]", "[["))

xy <- c(1,2,3,4,5)

trace <- trace.lim(lim = lim, xy = xy, plot = FALSE)

trace

plot_lim(dt = trace$dt, xy = trace$xy,
         int = trace$int, include = trace$include)


StratigrapheR documentation built on July 9, 2023, 6:02 p.m.