Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/create.rawDist.R
Creates a rawDist
data object from arbitary coordinates ready for plotting or sample spot alignment.
1 2 | create.rawDist(spots, gbs, main, spot.seq.names = NULL, sample.name = NULL,
scaling.factor = 1, unit = NULL)
|
spots |
A list of |
gbs |
|
main |
|
spot.seq.names |
optional. A character vector of equal length to number of sample |
sample.name |
optional. A character vector ( |
scaling.factor |
optional. A numeric value defining the scale of photograph in pixels / |
unit |
optional. A charater vector ( |
This function can be used to create arbitary test data, which can be passed further on in sclero
package function hierarchy.
Returns a list of class rawDist
, which contains spatstat point patterns. The returned rawDist
can be plotted using the generic plotting command.
Mikko Vihtakari
read.ijdata
for generating IJDATA
objects.
convert.ijdata
for converting IJDATA
objects to rawDist
objects.
plot.rawDist
for plotting.
spot.dist
for aligning sample spots.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | dev.off()
W <- square(10)
S <- ppp(x = c(7, 5, 3), y = rep(5,3), window = W)
G <- psp(x0 = c(8,6,4,2), y0 = rep(2,4), x1 = c(8,6,4,2), y1 = rep(8,4), window = W)
M <- psp(x0 = 0, x1 = 8, y0 = 5, y1 = 5, window = W)
x <- create.rawDist(spots = S, gbs = G, main = M)
plot(x)
## Generate random points for alignment
set.seed(1)
S <- rpoint(n = 5, win = owin(xrange = c(2,7), yrange = c(5,7)))
S$window <- W
G <- psp(x0 = c(7,5,3,1), y0 = rep(2,4), x1 = c(9,7,5,3), y1 = rep(8,4), window = W)
M <- psp(x0 = 0, x1 = 8, y0 = 1, y1 = 1, window = W)
x <- create.rawDist(spots = S, gbs = G, main = M)
plot(x)
y <- spot.dist(x)
plot(y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.