Sample.int: Random integer values simulation

View source: R/random_generators.R

Random integer values simulationR Documentation

Random integer values simulation

Description

Random integer values simulation.

Usage

Sample.int(n, size = n, replace = FALSE) 
Sample(x, size, replace = FALSE) 

Arguments

x

A numeric vector for sampling.

n

This must be an integer value. The function will then draw random integer values from 1:n.

size

The number of integer values to sample.

replace

Do you want to sample with replacement? If yes, set this equal to TRUE.

Details

The function does the same job, up to some level, with R's built-in fuction sample.int.

Value

A vector with integer values.

Author(s)

Manos Papadakis.

R implementation: Manos Papadakis <papadakm95@gmail.com>. R documentation: Michail Tsagris <mtsagris@yahoo.gr>.

See Also

Runif, rbeta1, riag

Examples

x <- Sample.int(10, 1000, replace = TRUE)
Sample(x,length(x))

Rfast2 documentation built on Aug. 8, 2023, 1:11 a.m.