# runifpoint

From spatstat v1.3-4
by Adrian Baddeley

##### Generate N Uniform Random Points

Generate a random point pattern containing $n$ independent uniform random points.

- Keywords
- spatial

##### Usage

`runifpoint(n, win=owin(c(0,1),c(0,1)), giveup=1000)`

##### Arguments

- n
- Number of points.
- win
- Window in which to simulate the pattern.
An object of class
`"owin"`

or something acceptable to`as.owin`

. - giveup
- Number of attempts in the rejection method after which the algorithm should stop trying to generate new points.

##### Details

If `win`

is a rectangle then this algorithm simply
generates $n$ independent random points uniformly distributed
in the rectangle, by assigning uniform random values to their
cartesian coordinates.

If `win`

is not a rectangle, the algorithm uses the rejection
method. It finds a rectangle enclosing the window,
generates points in this rectangle, and tests whether they fall in
the desired window. It gives up after `giveup`

consecutive
failures have occurred.

##### Value

- The simulated point pattern (an object of class
`"ppp"`

).

##### See Also

##### Examples

```
# 100 random points in the unit square
pp <- runifpoint(100)
```

*Documentation reproduced from package spatstat, version 1.3-4, License: GPL version 2 or newer*

### Community examples

Looks like there are no examples yet.