This function allows you to calculate the N-th highest number of a vector. In other words, it is the N-th max; it calculates the maximum after removing (n-1) higher numbers (maxes). Note that k=1 yields the traditional global maximum.

1 | ```
nth_highest(x, k = 1)
``` |

`x` |
Data vector. |

`k` |
The N-th highest value or N-th max. For example, k=2 yields the second highest value. Note that k=1 gives the highest value aka the global max. Defaults to 1. |

1 2 |

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.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.