transect.im {spatstat} | R Documentation |
Extract the pixel values of a pixel image at each point along a linear transect.
transect.im(X, ..., from="bottomleft", to="topright", nsample=512, click=FALSE, add=FALSE)
X |
A pixel image (object of class |
... |
Ignored. |
from,to |
Optional. Start point and end point of the transect.
Pairs of (x,y) coordinates
in a format acceptable to |
nsample |
Integer. Number of sample locations along the transect. |
click |
Optional.
Logical value.
If |
add |
Logical. If |
The pixel values of the image X
along a line segment
will be extracted. The result is a function table ("fv"
object)
which can be plotted directly.
If click=TRUE
, then the user is prompted to click two points on
the plot of X
. These endpoints define the transect.
Otherwise, the transect is defined by the endpoints
from
and to
. The default is a diagonal transect from
bottom left to top right of the frame.
An object of class "fv"
which can be plotted.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au
and Rolf Turner r.turner@auckland.ac.nz
Z <- density(redwood) plot(transect.im(Z)) ## Not run: if(FALSE) { plot(transect.im(Z, click=TRUE)) } ## End(Not run)