create_param: General function to create a parameter.

Description Usage Arguments Value Note Author(s) Examples

Description

General function to create a parameter.

Usage

1
create_param(name, id, value, ...)

Arguments

name

the parameters' name. Valid names can be found in get_param_names

id

the parameter's ID

value

value of the parameter

...

specific parameter parameters

Value

a parameter

Note

Prefer using the named functions create_alpha_param, create_beta_param, create_clock_rate_param, create_kappa_1_param, create_kappa_2_param, create_lambda_param, create_m_param, create_mean_param, create_mu_param, create_rate_ac_param, create_rate_ag_param, create_rate_at_param, create_rate_cg_param, create_rate_ct_param, create_rate_gt_param, create_s_param, create_scale_param, and create_sigma_param

Author(s)

Richèl J.C. Bilderbeek

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
  # Create an alpha parameter
  alpha_param <- create_alpha_param()

  # Use the parameter in a distribution
  beta_distr <- create_beta_distr(
    alpha = alpha_param
  )

  # Use the distribution to create a BEAST2 input file
  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 = beta_distr
    )
  )
  testit::assert(file.exists(beast2_input_file))

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