X-Git-Url: https://git.auder.net/?p=epclust.git;a=blobdiff_plain;f=pkg%2Ftests%2Ftestthat%2Fhelper-common.R;fp=pkg%2Ftests%2Ftestthat%2Fhelper-common.R;h=f442a449484c1c2f78e2c46ab4f2985c3ee00dab;hp=0000000000000000000000000000000000000000;hb=e906736ea27105237e84c904dce6170353726292;hpb=57f337af19cd6251815bb1ff2d62f4c58e8b6078 diff --git a/pkg/tests/testthat/helper-common.R b/pkg/tests/testthat/helper-common.R new file mode 100644 index 0000000..f442a44 --- /dev/null +++ b/pkg/tests/testthat/helper-common.R @@ -0,0 +1,3 @@ +# Shorthand: map 1->1, 2->2, 3->3, 4->1, ..., 149->2, 150->3, ... (if base==3) +I = function(i, base) + (i-1) %% base + 1