# WARNING - Generated by {fusen} from /dev/flat_full.Rmd: do not edit by hand
#' My median
#' @import testthat
#' @import qpdf
#'
#' @param x Vector of Numeric values
#' @inheritParams stats::median
#'
#' @return
#' Median of vector x
#' @export
#'
#' @examples
#' my_median(1:12)
#'
#' # Example with your dataset in "inst/"
#' datafile <- system.file("nyc_squirrels_sample.csv", package = "pulso2")
#' nyc_squirrels <- read.csv(datafile)
#' # Apply my function
#' my_median(nyc_squirrels[,"hectare_squirrel_number"])
my_median <- function(x, na.rm = TRUE) {
if (!is.numeric(x)) {stop("x should be numeric")}
stats::median(x, na.rm = na.rm)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.