An Ark object can create and remember pseudonyms. Given the same input, it will always return the same pseudonym. No pseudonym will repeat.
log
Hashtable for all used pseudonyms. Inputs (keys) are stored as hashes.
new()
Create new ark object.
Ark$new(alliterate = FALSE, parts = NULL, seed = NULL)
alliterate
Logical. Should the Ark return alliterations by default?
parts
List of character vectors with name parts to be used for the pseudonyms. Defaults to adjectives and animals.
seed
Random seed for permutation of name parts. Use this to make
Ark reproducible (to the extent that the random number generation is
reproducible). If NULL (default), the random number generator is left
alone. This is a convenience argument and equivalent to calling
set.seed()
before creating the Ark.
A new Ark
object.
pseudonymize()
Create Pseudonyms for input.
Ark$pseudonymize(..., .alliterate = NULL)
...
One or more R objects.
.alliterate
Logical. Return only pseudonyms that are
alliterations. Defaults to TRUE if the Ark was created with
Ark$new(alliterate = TRUE)
, FALSE otherwise. If FALSE, pseudonyms
may still be alliterations by coincidence.
Character vector of pseudonyms with same length as input.
print()
Pretty-print an Ark object.
Ark$print(n = NULL)
n
A positive integer. The number of example pseudonyms to print.
length()
Number of used pseudonyms in an Ark.
Ark$length()
length_allit()
Number of used alliterations in an Ark.
Ark$length_allit()
clone()
The objects of this class are cloneable with this method.
Ark$clone(deep = FALSE)
deep
Whether to make a deep clone.