d_norm_1 <- as_d(dnorm)
d_norm_2 <- as_d(dnorm, mean = 1)
plot(d_norm_1)
lines(d_norm_2, col = "red")
# Usage of `n_extra_grid` is important in case of "continuous" p- and
# q-functions
simple_p <- new_p(data.frame(x = c(0, 1), y = c(0, 1)), "continuous")
plot(simple_p, main = "Case study of n_extra_grid argument")
lines(simple_p, n_extra_grid = 0, col = "red")
# R-functions are plotted with histogram
plot(as_r(d_norm_1))
Run the code above in your browser using DataLab