setBLOBs: setBLOBs

Description Usage Arguments See Also Examples

Description

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

Usage

1
2
3
  ## S4 method for signature 'REARandom,numeric,numeric,numeric,character'
setBLOBs(REARandomObject,
  id = 42, n = 1, size = 8, format = "base64")

Arguments

REARandomObject

an Object of class REARandom to prepare for generateBlobs 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, 100]

size

The size in bits of the objects to return (must be divisible by 8)

format

Either 'base64' or 'hex' to specify how the BLOBs are serialized

See Also

Other REARandom Constructor Methods: setApiKey, setDecimals,REARandom,numeric,numeric,numeric,logical-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
12
13
14
15
16
17
18
19
## Not run: 

# Set object for retrieval of Binary Large OBjects that are 4MB in Size
# and serialized as Hexadecimal values
myNewReaRandomObject <- reaRandom() %>%
					   setBLOBs(id = 37,
					   			n = 12,
					   			size = 4096,
					   			format = "hex")

# Same as above, but 0.5MB objects serialized as base64
myNewReaRandomObject <- myNewReaRandomObject %>%
						   setBLOBs(id = 37,
						   			n = 12,
						   			size = 512,
						   			format = "base64")


## End(Not run)

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