I know that I can set the RNGversion with e.g.
RNGversion("3.5.2")
but is it possible to query R for which version i am currently using?
EDIT:
my problem is that something changed around version 3.6.0 which is not visible in RNGkind()
e.g
library(magrittr)
RNGversion("3.5.2")
RNGkind()
set.seed(1)
tibble::tibble(A = 1:5000) %>%
dplyr::sample_n(2)
yields:
> "Mersenne-Twister" "Inversion" "Rounding"
> # A tibble: 2 x 1
A
<int>
1328
1861
but:
RNGversion("4.0.2")
RNGkind()
set.seed(1)
tibble::tibble(A = 1:5000) %>%
dplyr::sample_n(2)
yields
> "Mersenne-Twister" "Inversion" "Rejection"
> # A tibble: 2 x 1
A
<int>
1 1017
2 4775
both pieces of code returns a reproducible output, but different, even though RNGkind() returns the same thing. Hence I want to know the RNGvesion()
Aucun commentaire:
Enregistrer un commentaire