Nothing
#' Density function
#'
#' @param rt vector of reaction times
#' @param tt grid to evaluate the density on
#'
#' @return a vector of \code{length(tt)}
#'
#' @details Can be passed to the argument \code{densityMethod} of \code{\link{estDstarM}}. This function is a minimal
#' example to use as custom smoothing function.
#'
#' @examples
#' x <- rgamma(1e5, 1, 1)
#' tt <- seq(0, 5, .01)
#' d <- Density(x, tt)
#' hist(x, freq = FALSE)
#' lines(tt, DstarM:::Density(x, tt))
#' @export
Density <- function(rt, tt) {
return(stats::density(x = rt, from = min(tt), to = max(tt), n = length(tt))$y)
}
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.