PhyDat2Morphy {TreeSearch} | R Documentation |
Initialize a Morphy object from a phyDat
object
Description
Creates a new Morphy object with the same size and characters as the
phyDat
object.
Once finished with the object, it should be destroyed using
UnloadMorphy()
to free the allocated memory.
Usage
PhyDat2Morphy(phy, gap = "inapplicable")
Arguments
phy |
An object of phangorn class |
gap |
An unambiguous abbreviation of |
Value
PhyDat2Morphy()
returns a pointer to an initialized Morphy object.
Author(s)
Martin R. Smith (martin.smith@durham.ac.uk)
See Also
Other Morphy API functions:
GapHandler()
,
MorphyErrorCheck()
,
MorphyWeights()
,
SingleCharMorphy()
,
UnloadMorphy()
,
is.morphyPtr()
,
mpl_apply_tipdata()
,
mpl_attach_rawdata()
,
mpl_attach_symbols()
,
mpl_delete_Morphy()
,
mpl_delete_rawdata()
,
mpl_first_down_recon()
,
mpl_first_up_recon()
,
mpl_get_charac_weight()
,
mpl_get_gaphandl()
,
mpl_get_num_charac()
,
mpl_get_num_internal_nodes()
,
mpl_get_numtaxa()
,
mpl_get_symbols()
,
mpl_init_Morphy()
,
mpl_new_Morphy()
,
mpl_second_down_recon()
,
mpl_second_up_recon()
,
mpl_set_charac_weight()
,
mpl_set_num_internal_nodes()
,
mpl_set_parsim_t()
,
mpl_translate_error()
,
mpl_update_lower_root()
,
mpl_update_tip()
,
summary.morphyPtr()
Examples
data("Lobo", package="TreeTools")
morphyObj <- PhyDat2Morphy(Lobo.phy)
# Set object to be destroyed at end of session or closure of function
# on.exit(morphyObj <- UnloadMorphy(morphyObj), add = TRUE)
# Do something with pointer
# ....
# Or, instead of on.exit, manually destroy morphy object and free memory:
morphyObj <- UnloadMorphy(morphyObj)