# SampleInt

From raster v3.0-12
by Robert Hijmans

##### Sample integer values

Take a random sample from a range of integer values between 1 and `n`

. Its purpose is similar to that of `sample`

, but that function fails when `n`

is very large.

- Keywords
- spatial

##### Usage

`sampleInt(n, size, replace=FALSE)`

##### Arguments

- n
Positive number (integer); the number of items to choose from

- size
Non-negative integer; the number of items to choose

- replace
Logical. Should sampling be with replacement?

##### Value

vector of integer numbers

##### Examples

```
# NOT RUN {
sampleInt(1e+12, 10)
# this may fail:
# sample.int(1e+12, 10)
# sample.int(1e+9, 10)
# }
```

*Documentation reproduced from package raster, version 3.0-12, License: GPL (>= 3)*

### Community examples

Looks like there are no examples yet.