Isn't that what bootstrap p-values do?
If yes, save the vector, sort and read in the appropriate position (i.e. 500% by 5% with 10k repeat). There are some subtle problems with positions that you can choose, for example. help(quantile)discussed in the "Types" section.
source
share