Skip to contents

This generates a starting place for writing a new greta distribution. By default this will save the output to "R/dist_name.R". To save to somewhere else, see greta_distribution_template(), which will generate the R code as plain text, and you can then save somewhere else as you wish.

Usage

write_new_distribution(
  dist_name = NULL,
  dist_arg_list = NULL,
  overwrite = FALSE
)

Arguments

dist_name

name of distribution.

dist_arg_list

arguments for distribution.

overwrite

logical. default FALSE. Whether to overwrite the test file if it already exists.

Value

writes to file a new distribution name.

Examples

if (FALSE) { # \dontrun{
write_new_distribution(
  dist_name = "lognormal", 
  dist_arg_list = c("meanlog", "sdlog")
  )
} # }