create_distr: General function to create a distribution.

Description Usage Arguments Value Note Author(s) Examples

Description

General function to create a distribution.

Usage

1

Arguments

name

the distribution name. Valid names can be found in get_distr_names

id

the distribution's ID

...

specific distribution parameters

Value

a distribution

Note

Prefer using the named functions create_beta_distr, create_exp_distr, create_gamma_distr, create_inv_gamma_distr, create_laplace_distr, create_log_normal_distr, create_normal_distr, create_one_div_x_distr, create_poisson_distr and create_uniform_distr

See create_beta_distr, create_exp_distr, create_gamma_distr, create_inv_gamma_distr, create_laplace_distr, create_log_normal_distr, create_normal_distr, create_one_div_x_distr, create_poisson_distr and create_uniform_distr for examples how to use those distributions

Author(s)

Richèl J.C. Bilderbeek

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  # Use any distribution
  distr <- create_beta_distr()

  beast2_input_file <- tempfile(fileext = ".xml")
  create_beast2_input_file(
    input_filename = get_fasta_filename(),
    beast2_input_file,
    tree_prior = create_yule_tree_prior(
      birth_rate_distr = distr
    )
  )
  testit::assert(file.exists(beast2_input_file))

ropensci/beautier documentation built on May 14, 2019, 8:52 p.m.