x <- rexp(20, rate = 1)
dx <- dist_empirical(sample = x, positive = TRUE)
y <- rnorm(20)
dy <- dist_empirical(sample = y)
plot_distributions(
exponential = dx,
normal = dy,
.x = seq(-3, 3, length.out = 100)
)
Run the code above in your browser using DataLab