Power functions for composite sampling tests in R