X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=epclust%2Ftests%2Ftestthat%2Fhelper-common.R;fp=epclust%2Ftests%2Ftestthat%2Fhelper-common.R;h=f442a449484c1c2f78e2c46ab4f2985c3ee00dab;hb=40f12a2f66d06fd77183ea02b996f5c66f90761c;hp=0000000000000000000000000000000000000000;hpb=a52836b23adb4bfa6722642ec6426fb7b5f39650;p=epclust.git diff --git a/epclust/tests/testthat/helper-common.R b/epclust/tests/testthat/helper-common.R new file mode 100644 index 0000000..f442a44 --- /dev/null +++ b/epclust/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