annotate.analysis.page.svg: annotate.analysis.page.svg

Description Usage Arguments Details Value Author(s)

View source: R/annotator.R

Description

Annotate an AnalysisPage SVG plot

Usage

1
2
3
annotate.analysis.page.svg(svg.filename, x, y, ids, group.lengths = length(x),
  class.name = "plot-point", start = 0, uniquify.ids.suffix = NULL,
  verbose = FALSE)

Arguments

svg.filename

Path to SVG file

x

Vector of x values

y

Vector of y values (same length as x)

ids

Vector of ids (same length as x)

group.lengths

Positive integer vector summing to x (an ordered partition of length(x)) giving length of contiguous groups of elements. Each integer must be at least 3 or it won't be able to activate that group. The search will be for contiguous elements, then continue where the last one left off, possibly after a gap. Default: length(x), look for a single contiguous block.

class.name

Class name to apply to points (default: "plot-point")

start

This is a 0-based integer. It is an offset of where to start looking for the plot elements. Default is 0, to start at the beginning. The meaning of the index after that is not exposed to the interface, however this function returns numbers that you can then use to "continue looking where you left off".

uniquify.ids.suffix

NULL or a string. If NULL then do not modify the identifiers in the SVG file. If a string, then call uniquify.ids.in.svg.files to modify the "glyph" and "clip" identifiers, using this word as the suffixes parameter).

verbose

Logical. Default, FALSE. Passed through (as integer) to C++

Details

The plot points are found by looking for a sequence of points whose x and y coordinates correlation >= 0.999 with the query x and y vectors.

Then each is tagged with class.name, and with the corresponding ID from the vector.

The file is overwritten.

Value

Integer, the "next start" position, or where to start looking to continue after this stretch. (Invisibly). If no match was found then returns NULL.

Author(s)

Brad Friedman


AnalysisPageServer documentation built on April 28, 2020, 6:32 p.m.