#' Calculate percentiles
#'
#' Calculate the percentiles of a row in a tibble.
#'
#' @param tibRow a row in a tibble; the row need not contain all the columns of the tibble.
#' @param tib a tibble.
#'
#' @return The percentiles of each of the input columns.
#' @export
#'
#' @examples
calculatePercentiles <- function(tibRow, tib) {
vars <- colnames(tibRow)
sapply(vars, function(var){ecdf(tib[[var]])(tibRow[[var]])})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.