SMOLR_TO_PPP: Convert localizations to point pattern for spatstat package

Description Usage Arguments Value Author(s) See Also Examples

Description

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.

Usage

1
SMOLR_TO_PPP(x, y, xlim, ylim, marks, shape)

Arguments

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".

Value

Returns a spatstat ppp object, or a list of ppp objects.

Author(s)

Optical Imaging Centre ErasmusMC Rotterdam

See Also

ppp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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]))

maartenpaul/SMoLR documentation built on May 21, 2019, 10:14 a.m.