setDecimals: setDecimals

Description Usage Arguments See Also Examples

Description

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

Usage

1
2
3
  ## S4 method for signature 'REARandom,numeric,numeric,numeric,logical'
setDecimals(REARandomObject,
  id = 42, n = 1, decimalPlaces = 1, replacement = FALSE)

Arguments

REARandomObject

an Object of class REARandom to prepare for generateDecimalFractions 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.

decimalPlaces

The number of decimal places to return. Must be in [1, 20]; defaults to 1.

replacement

Should numbers be sampled with or without replacement. Default is FALSE (e.g., unique values).

See Also

Other REARandom Constructor Methods: setApiKey, setBLOBs,REARandom,numeric,numeric,numeric,character-method, setIntegers,REARandom,numeric,numeric,numeric,numeric,logical,numeric-method, setNormal,REARandom,numeric,numeric,numeric,numeric,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
myNewReaRandomObject <- reaRandom() %>%
					   setDecimals(id = 42,
								 	   n = 300,
								 	   decimalPlaces = 5,
								 	   replacement = TRUE)


## End(Not run)

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