Prints a prior object

# S3 method for prior
print(
  x,
  short_name = FALSE,
  parameter_names = FALSE,
  plot = FALSE,
  digits_estimates = 2,
  silent = FALSE,
  ...
)

Arguments

x

a prior

short_name

whether prior distribution names should be shorted

parameter_names

whether parameter names should be printed

plot

to return bquote formatted prior name for plotting.

digits_estimates

number of decimals to be displayed for printed parameters.

silent

to silently return the print message.

...

additional arguments

Value

print.prior invisibly returns the print statement.

See also

Examples

# create some prior distributions
p0 <- prior(distribution = "point",  parameters = list(location = 0))
p1 <- prior(distribution = "normal", parameters = list(mean = 0, sd = 1))

# print them
p0
#> Spike(0)
p1
#> Normal(0, 1)

# use short names
print(p1, short_name = TRUE)
#> N(0, 1)

# print parameter names
print(p1, parameter_names = TRUE)
#> Normal(mean = 0, sd = 1)

# generate bquote plotting syntax
plot(0, main = print(p1, plot = TRUE))