Learn R Programming

Rrdrand (version 0.1-16)

Rrdrand-package: DRNG(Digital Random Numbers Generate) on Intel CPUs with the RdRand instruction for R

Description

Make use of the hardware random number accessed by the RdRand instruction in recent Intel CPUs (Ivy Bridge and later).

This library defines the user_unif_rand symbol and gives back a random number of RdRand.

`hasRDRAND' returns either RdRand available by executing the CPUID.

if HasRDRAND return false of library load time, it does not change the RNGkind.

if you do changed RNGkind("user") by manual operation and RdRand is not available, you get NaN.

If you want to detach, it will be set to RNGkind of "default".

Usage

hasRDRAND()

Arguments

Details

http://prs.ism.ac.jp/~nakama/Rrdrand

Examples

Run this code
# NOT RUN {
  library(Rrdrand)
  if(hasRDRAND())
    print(RNGkind())
    print(runif(3))
# }

Run the code above in your browser using DataLab