R/scaled_dnorm.R

Defines functions scaled_dnorm

# introduce "scale" variable to shrink denisty to fit in the vertical plot range
scaled_dnorm <- function(theta, mean = 4, sd = 1, log = TRUE, scale = 1) {
  tmp <- stats::dnorm(theta, mean, sd)
  if (log) {
    tmp <- log(tmp)
  }
  return(scale * tmp)
}
cnfoley/mrclust documentation built on Oct. 20, 2021, 2:10 p.m.