n <- 1021 # prime
d <- 4 # dimension
## Korobov's sequence
generator <- 76 # see l'Ecuyer and Lemieux
u <- korobov(n, d = d, generator = generator)
pairs(u, gap = 0, pch = ".", labels = as.expression(
sapply(1:d, function(j) bquote(italic(u[.(j)])))))
## Randomized Korobov's sequence
set.seed(271)
u <- korobov(n, d = d, generator = generator, randomize = "shift")
pairs(u, gap = 0, pch = ".", labels = as.expression(
sapply(1:d, function(j) bquote(italic(u[.(j)])))))
## Generalized Halton sequence (randomized by definition)
set.seed(271)
u <- ghalton(n, d)
pairs(u, gap = 0, pch = ".", labels = as.expression(
sapply(1:d, function(j) bquote(italic(u[.(j)])))))
## For sobol() examples, see demo(sobol_examples)
Run the code above in your browser using DataLab