halton | R Documentation |
Calculate elements of the Halton sequence and of some other pseudo-random sequences.
halton(
n = 1L,
base = as.integer(c(2)),
start = 1L,
random = "NO",
type = "halton",
scrambler = "NO",
is_validation = TRUE,
n_cores = 1L
)
n |
positive integer representing the number of sequence elements. |
base |
vector of positive integers greater then one representing the bases for each of the sequences. |
start |
non-negative integer representing the index of the first element of the sequence to be included in the output sequence. |
random |
string representing the method of randomization to be
applied to the sequence. If |
type |
string representing type of the sequence. Default is "halton" that is Halton sequence. The alternative is "richtmyer" corresponding to Richtmyer sequence. |
scrambler |
string representing scrambling method for the
Halton sequence. Possible options are |
is_validation |
logical value indicating whether input
arguments should be validated. Set it to |
n_cores |
positive integer representing the number of CPU cores
used for parallel computing. Currently it is not recommended to set
|
Function seqPrimes
could be used to
provide the prime numbers for the base
input argument.
The function returns a matrix which i
-th column
is a sequence with base base[i]
and elements with indexes
from start
to start + n
.
J. Halton (1964) <doi:10.2307/2347972>
S. Kolenikov (2012) <doi:10.1177/1536867X1201200103>
halton(n = 100, base = c(2, 3, 5), start = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.