trim | R Documentation |
This functions generates a new set of coordinates by subsetting a set of coordinates.
trim(x, from, to, ...)
## S3 method for class 'grob'
trim(x, from, to, rep=FALSE, ...)
## S3 method for class 'gPath'
trim(x, from, to, rep=FALSE,
strict=FALSE, grep=FALSE, global=FALSE, ...)
## S3 method for class 'character'
trim(x, from, to, rep=FALSE,
strict=FALSE, grep=FALSE, global=FALSE, ...)
x |
A set of coordinates. Or a grob, or a gPath (or a character value) identifying a grob that has already been drawn from which coordinates are generated. |
from |
A numeric vector or a unit object describing the start point of each subset. |
to |
A numeric vector or a unit object describing the end point of each subset. |
rep |
A logical value indicating whether the |
strict , grep , global |
Arguments controlling the interpretation of the gPath
(passed to |
... |
Arguments used by methods. |
A new set of coordinates.
Paul Murrell
trim
g <- segmentsGrob(0, .5, 1, .5)
trim(g, from=.1, to=.2)
trim(g, from=.1, to=.2, rep=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.