The main two XML tags are these:

create_beast2_input_from_model(input_filename, inference_model)



A FASTA filename. Use get_fasta_filename to obtain a testing FASTA filename.


a Bayesian phylogenetic inference model. An inference model is the complete model setup in which a site model, clock model, tree prior and more are specified. Use create_inference_model to create an inference model. Use check_inference_model to check if an inference model is valid. Use rename_inference_model_filenames to rename the files in an inference model.


a character vector of XML strings

See also

Use create_beast2_input_file_from_model to also save it to file. Use create_xml_declaration to create the XML text of the XML declaration. Use create_beast2_input_beast to create to create the XML text of the beast tag.


Richèl J.C. Bilderbeek


text <- create_beast2_input_from_model(
  input_filename = get_fasta_filename(),
  inference_model = create_inference_model()