rand_pseudo_bytes(n = 1)rand_bytes(n = 1)
rand_bytes(n = 1)
rnd <- rand_bytes(10) as.numeric(rnd) as.character(rnd) as.logical(rawToBits(rnd)) # numbers range from 0 to 255 rnd <- rand_bytes(100000) hist(as.numeric(rnd), breaks=-1:255)
Run the code above in your browser using DataLab