y1 <- rnorm(500)
y2 <- rlnorm(500)
# good fit
qqplot2(y1)
# bad fit
qqplot2(y2)
# defining a new fQuant function
fQuant2 <- function(q, x)
qlnorm(q, mean(log(x)), sd(log(x)))
# better fit
qqplot2(y2, fQuant2)
Run the code above in your browser using DataLab