hideLocation
Obfuscating the true location of the real data.R/hideLocation.R
hideLocation.Rd
Hides the true location of the data as a non-obvious calculation string.
hideLocation(trueLoc, nSubjects)
trueLoc | A vector of one or more numbers in the set 1, 2, ..., nSubjects whose locations are to be hidden. |
---|---|
nSubjects | An integer larger than 1 used to define the set 1, 2, ..., nSubjects. |
Returns a character vector, each element being a string
containing an obscure calculation which, if parsed and evaluated, would return
the value of the corresponding number in trueLoc
.
trueLoc <- hideLocation(3,100) trueLoc#> [1] "2^(log(1.39837533263827e+20, base=13) - 16.5)"revealLocation(trueLoc)#> [1] 3#> [1] 63 102 111ans <- hideLocation(trueLoc , n) ans#> [1] "2^(log(174105737272526720, base=13) - 9.5)" #> [2] "2^(log(1.31300191323298e+22, base=7) - 19.5)" #> [3] "2^(log(3.7363723047113e+28, base=15) - 17.5)"revealLocation(ans)#> [1] 63 102 111