I am writing a R package, and I\'m using testthat for unit testing. Many of my unit tests are for testing functions that work on a certain object specific to my package. For the
Maybe it will help you: https://github.com/gmum/gmum.r/tree/master/tests/testthat
There is helper function called combinations in the file combinations.R
Then it is included in test_cec_centroid_assignment.R using source('combinations.R') I'm not sure it is a good convention but it works.