A function to find the probability of values greater or lesser than target, from a vector of values presumably obtained in random permutations.
pval(s, target = NULL, greater = TRUE)
The sampling distribution vector to use.
The value to target in the distribution. (If null, the first value in the vector is used.). If the target exists outside the range of s, a probability of 0 or 1 is certain.
Logical value for whether the probability should be "greater than or equal to". Change to greater = FALSE for "less than or equal to".
Michael Collyer