#' density estimation
#' @export
#' @param y numeric variable
#' @param family char
#' @param px dimension
de <- function(y,family=c("joint","neighborhood","semi"),px=0) {
family = match.arg(family)
if (family=="semi"& px==0){
stop("specify px")
}
res = switch(family,joint=density0.joint(y=y),
neighborhood=density0.neighborhood(y=y),
semi=density0.semi(y=y,px))
res
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.