# create a standard normal prior distribution
p1 <- prior(distribution = "normal", parameters = list(mean = 1, sd = 1))
# create a half-normal standard normal prior distribution
p2 <- prior(distribution = "normal", parameters = list(mean = 1, sd = 1),
truncation = list(lower = 0, upper = Inf))
# the prior distribution can be visualized using the plot function
# (see ?plot.prior for all options)
plot(p1)
Run the code above in your browser using DataLab