Function to calculate z-score from a normal distribution from a two-tailed p-value and sign vector (e.g. log2 fold change). To avoid -Inf/Inf z-scores, p-values < 'limit' are set to 'limit'.

1 |

`pval` |
Vector with p-values |

`direction` |
Vector that will be used to determine the sign of the z-scores. Only the sign of the values is considered, so any suitable vectors (e.g. log2 fold change) can be supplied. |

`limit` |
Numeric (default: .Machine$double.xmin). pvalues < 'limit' will be set to 'limit' to avoid Inf/-Inf z-scores. Set to NULL to disable. |

`tails` |
Numeric, either 1 for p-values from one-tailed or 2 for p-values from two-tailed tests. |

A vector of z-scores

Thomas Sandmann

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.