setNormal: setNormal

Description Usage Arguments See Also Examples

Description

Method used to create REARandom object that will be passed in API call to Random.org's generateGaussians method.

Usage

1
2
3
4
  ## S4 method for signature 'REARandom,numeric,numeric,numeric,numeric,numeric'
setNormal(REARandomObject,
  id = 42, n = 1, mean = 0, standardDeviation = 1,
  significantDigits = 2)

Arguments

REARandomObject

an Object of class REARandom to prepare for generateGaussians API call

id

An ID number used to match response to request. Defaults to 42.

n

The number of random values to return. Must be in [1, 1e4]; defaults to 1.

mean

Value of the mean for the distribution from which to draw random numbers. Must be in [-1e6, 1e6]; defaults to 0.

standardDeviation

Value for the standard deviation of the distribution. Must be in [-1e6, 1e6]; defaults to 1.

significantDigits

The number of digits beyond the decimal to retain. Must be in [2, 20]; defaults to 2.

See Also

Other REARandom Constructor Methods: setApiKey, setBLOBs,REARandom,numeric,numeric,numeric,character-method, setDecimals,REARandom,numeric,numeric,numeric,logical-method, setIntegers,REARandom,numeric,numeric,numeric,numeric,logical,numeric-method, setStrings,REARandom,numeric,numeric,numeric,character,logical-method, setUniqueID,REARandom,numeric,numeric-method

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 

# Create a new REARandom object for random normal variables
myNewReaRandomObject <- reaRandom() %>%
					   setNormal(id = 37,
								     mean = 100,
								     standardDeviation = 15,
								     significantDigits = 10)


## End(Not run)

wbuchanan/reaRandom documentation built on May 4, 2019, 2:01 a.m.