setIntegers: setIntegers

Description Usage Arguments See Also Examples

Description

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

Usage

1
2
3
4
5
  ## S4 method for signature 
## 'REARandom,numeric,numeric,numeric,numeric,logical,numeric'
setIntegers(REARandomObject,
  id = 42, n = 1, min = 1, max = 999, replacement = FALSE,
  base = 10)

Arguments

REARandomObject

an Object of class REARandom to prepare for generateIntegers API call

id

ID Used for retrieval and matching of API call request and payload; default is 42.

n

Number of random values to generate; default is 1.

min

The minimum value integer to use for the request; default is 1.

max

The maximum value integer to use for the request; default is 999.

replacement

Whether the values should be sampled with or without replacement from the distribution.

base

Which base value should the numbers be reported in; defaults to base 10 (decimal). A value of 2 would provide binary values, a value of 8 would return octal values, and value of 16 would return hexadecimal values.

See Also

Other REARandom Constructor Methods: setApiKey, setBLOBs,REARandom,numeric,numeric,numeric,character-method, setDecimals,REARandom,numeric,numeric,numeric,logical-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
12
13
## Not run: 

# Create a new REARandom object to request random Integer values
myNewReaRandomObject <- reaRandom() %>%
						   setIntegers(id = 12,
									   n = 1000,
									   min = 1000,
									   max = 9999,
									   replacement = TRUE,
									   base = 8)


## End(Not run)

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