ropensci / taxize

A taxonomic toolbelt for R
https://docs.ropensci.org/taxize
Other
270 stars 61 forks source link

How to write class2tree tree to file? #872

Closed vragh closed 3 years ago

vragh commented 3 years ago

Apologies if this is a silly question, but how do I write the tree generated by taxize::class2tree to file? I'd like to save the tree in the Newick format if possible.

I can't seem to find a function in the package for this, and I'm not sure what kind of an object classtree is supposed to be (so I'm unsure what non-taxize functions I can use to write its contents out to a file).

vragh commented 3 years ago

Just managed to figure it out. All I needed to do was write out the objname$phylo slot using ape::write.tree.

sckott commented 3 years ago

nice work! yep, thats it