Here, the variables p_1 and p_2 are not defined within the scope of the function. This means that the function will fail if these are not defined as global variables in your environment. The correct way to do this is to pass these variables to the function via an argument, or to compute them within the function.
Here, the variables
p_1
andp_2
are not defined within the scope of the function. This means that the function will fail if these are not defined as global variables in your environment. The correct way to do this is to pass these variables to the function via an argument, or to compute them within the function.https://github.com/bschilder/ThreeWayTest/blob/a4c61c94ed339778355ffe0f406849bf54f1da22/R/functions.R#L332