SMOLR_TO_PPP | R Documentation |
A function to convert localization data coordinates to point patterns for the spatstat package. Input can be separate vectors, data.frame or a list of data.frames.
SMOLR_TO_PPP(x, y, xlim, ylim, marks, shape)
x |
X coordinates in nm, or a data.frame or list of data.frames with localization data. |
y |
Y coordinates in nm |
xlim |
Vector with the upper and lower limit of x coordinates |
ylim |
Vector with the upper and lower limit of y coordinates |
marks |
Vector to indictate different types/channels of the coordinates. If list or data.frame is used as input the channel column will be used for the marks. |
shape |
Shape of the point pattern, either a rectangle ("rect") or circle ("circle"). Default is "rect". |
Returns a spatstat ppp object, or a list of ppp objects.
Optical Imaging Centre ErasmusMC Rotterdam
ppp
example <- SMOLR_TO_PPP(smolrdata)
plot(example)
## The function is currently defined as
function (x, y, xlim, ylim, marks, shape)
{
UseMethod("smlmr_to_ppp")
}
#make triangulation plot
x <- SMOLR_TO_PPP(smolrdata)
#channel 1
plot(dirichlet(x[x$marks==1]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.