Hides the true location of the data as a non-obvious calculation string.

hideLocation(trueLoc, nSubjects)

Arguments

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.

Value

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.

See also

Examples

trueLoc <- hideLocation(3,100) trueLoc
#> [1] "2^(log(1.39837533263827e+20, base=13) - 16.5)"
#> [1] 3
n <- 200 trueLoc <- sample(1:n, 3) trueLoc
#> [1] 63 102 111
ans <- 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)"
#> [1] 63 102 111