Skip to contents

write.pml writes out the ML tree and the model parameters.

Usage

write.pml(x, file = "pml", save_rds = TRUE, ...)

Arguments

x

an object of class ancestral.

file

a file name. File endings are added.

save_rds

logical, if TRUE saves the pml object as a rds file, otherwise the alignment is saved as a fasta file.

...

Further arguments passed to or from other methods.

Value

write.pml returns the input x invisibly.

Examples

data(woodmouse)
fit <- pml_bb(woodmouse, "JC", rearrangement = "none")
#> optimize edge weights:  -1860.499 --> -1856.056 
#> optimize edge weights:  -1856.056 --> -1856.056 
#> optimize edge weights:  -1856.056 --> -1856.056 
write.pml(fit, "woodmouse")
unlink(c("woodmouse_pml.txt", "woodmouse_tree.nwk"))