powered by
Finds the mode using the density function and then obtains the maximum value.
dmode(x, adjust = 1.5)
Value vector. Numeric or integers.
Bandwidth adjustment. See density.
# NOT RUN { x <- rchisq(1000, 3) hist(x, br=50) abline(v = dmode(x), col = "red") abline(v = median(x), col = "green") abline(v = mean(x), col = "blue") # }
Run the code above in your browser using DataLab