dpUnif: Differentially Private Uniform Draw

Description Usage Arguments Value See Also Examples

View source: R/utilities-noise-generation.R

Description

Draw cryptographically secure random variates from a uniform distribution.

Usage

1
dpUnif(n, seed = NULL)

Arguments

n

An integer giving number of variates needed.

seed

An integer indicating a seed for R's PNRG, defaults to NULL.

Value

Random numeric vector of length n containing values between zero and one.

Draws secure random variates from the uniform distribution through openssl. If a seed is provided, the runif function is used to draw the random variates.

See Also

dpNoise

Examples

1
2
uniform_secure <- dpUnif(n=1000)
uniform_repeatable <- dpUnif(n=1, seed=75436)

privacytoolsproject/PSI-Library documentation built on Feb. 17, 2020, 2:03 p.m.