# rcell

##### Simulate Baddeley-Silverman Cell Process

Generates a random point pattern, a simulated realisation of the Baddeley-Silverman cell process model.

##### Usage

`rcell(win=square(1), nx=NULL, ny=nx, ..., dx=NULL, dy=dx, N=10)`

##### Arguments

- win
- A window.
An object of class
`owin`

, or data in any format acceptable to`as.owin()`

. - nx
- Number of columns of cells in the window.
Incompatible with
`dx`

. - ny
- Number of rows of cells in the window.
Incompatible with
`dy`

. - ...
- Ignored.
- dx
- Width of the cells. Incompatible with
`nx`

. - dy
- Height of the cells.
Incompatible with
`ny`

. - N
- Integer. Distributional parameter:
the maximum number of random points in each cell.
Passed to
`rcellnumber`

.

##### Details

This function generates a simulated realisation of the

The tile width is determined
either by the number of columns `nx`

or by the
horizontal spacing `dx`

.
The tile height is determined
either by the number of rows `ny`

or by the
vertical spacing `dy`

.
The cell process is then generated in these tiles.
The random numbers of points are generated by `rcellnumber`

.

Some of the resulting random points may lie outside the window `win`

:
if they do, they are deleted.
The result is a point pattern inside the window `win`

.

##### Value

- A point pattern (object of class
`"ppp"`

).

##### References

Baddeley, A.J. and Silverman, B.W. (1984)
A cautionary example on the use of second-order methods for analyzing
point patterns. *Biometrics* **40**, 1089-1094.

##### See Also

##### Examples

```
X <- rcell(nx=15)
plot(X)
plot(Kest(X))
```

*Documentation reproduced from package spatstat, version 1.31-2, License: GPL (>= 2)*