Nothing
#' Compute Bootstrap P of a Vector
#'
#' @family Bootstrap
#' @family Vector Function
#'
#' @author Steven P. Sanderson II, MPH
#'
#' @details
#' A function to return the ecdf probability of a vector.
#'
#' @description
#' This function takes in a vector as it's input and will return the ecdf probability
#' of a vector.
#'
#' @param .x A numeric
#'
#' @examples
#' x <- mtcars$mpg
#' bootstrap_p_vec(x)
#'
#' @return
#' A vector
#'
#' @export
#'
bootstrap_p_vec <- function(.x) {
# Tidyeval ----
x_term <- .x
# Checks ----
if (!is.numeric(.x)) {
rlang::abort(
message = "'.x' must be a numeric vector",
use_cli_format = TRUE
)
}
# Get ecdf
e <- stats::ecdf(x_term)
# Return ----
ret <- e(x_term)
return(ret)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.