<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.r-phylo.org/w/index.php?action=history&amp;feed=atom&amp;title=HowTo%2FInputtingTrees</id>
	<title>HowTo/InputtingTrees - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.r-phylo.org/w/index.php?action=history&amp;feed=atom&amp;title=HowTo%2FInputtingTrees"/>
	<link rel="alternate" type="text/html" href="https://www.r-phylo.org/w/index.php?title=HowTo/InputtingTrees&amp;action=history"/>
	<updated>2026-09-10T21:38:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://www.r-phylo.org/w/index.php?title=HowTo/InputtingTrees&amp;diff=468&amp;oldid=prev</id>
		<title>Hilmar: /* Example file attachments */</title>
		<link rel="alternate" type="text/html" href="https://www.r-phylo.org/w/index.php?title=HowTo/InputtingTrees&amp;diff=468&amp;oldid=prev"/>
		<updated>2008-02-06T19:03:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Example file attachments&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:03, 6 February 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l47&quot;&gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Test stuff here==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Test stuff here==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Example file attachments===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Example file attachments===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rda doesn't work yet because the format is not: &lt;/del&gt;[[Media:geospiza.rda|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rdafile&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Media:geospiza.rda|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Geospiza data&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:HowTo]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:HowTo]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Comparative Methods Help]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Comparative Methods Help]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hilmar</name></author>
	</entry>
	<entry>
		<id>https://www.r-phylo.org/w/index.php?title=HowTo/InputtingTrees&amp;diff=467&amp;oldid=prev</id>
		<title>Hilmar at 19:03, 6 February 2008</title>
		<link rel="alternate" type="text/html" href="https://www.r-phylo.org/w/index.php?title=HowTo/InputtingTrees&amp;diff=467&amp;oldid=prev"/>
		<updated>2008-02-06T19:03:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:03, 6 February 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Okay, so you've just completed a phylogenetic analysis or otherwise obtained a file containing a phylogeny, and you'd like to use that phylogeny as a framework for comparative analysis in R. There are several different phylogeny representations used in various R packages, but the most common is &amp;quot;phylo&amp;quot; (more specifically, objects of class &amp;quot;phylo&amp;quot;). Luckily, converting your phylogeny to &amp;quot;phylo&amp;quot; representation is easy.   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Okay, so you've just completed a phylogenetic analysis or otherwise obtained a file containing a phylogeny, and you'd like to use that phylogeny as a framework for comparative analysis in R. There are several different phylogeny representations used in various R packages, but the most common is &amp;quot;phylo&amp;quot; (more specifically, objects of class &amp;quot;phylo&amp;quot;). Luckily, converting your phylogeny to &amp;quot;phylo&amp;quot; representation is easy.   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The package APE can read phylogenies in either Newick or NEXUS format using the read.tree and read.nexus commands, respectively. (Note: we assume you have already placed these input trees in your working directory, see [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;https://www.nescent.org/wg_phyloinformatics/&lt;/del&gt;R_Hackathon/Basics the basics])&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The package APE can read phylogenies in either Newick or NEXUS format using the read.tree and read.nexus commands, respectively. (Note: we assume you have already placed these input trees in your working directory, see [&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/ins&gt;R_Hackathon/Basics&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|&lt;/ins&gt;the basics&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/ins&gt;])&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    MyTree &amp;lt;- read.tree(&amp;quot;MyNewickTreefile.tre&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    MyTree &amp;lt;- read.tree(&amp;quot;MyNewickTreefile.tre&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hilmar</name></author>
	</entry>
	<entry>
		<id>https://www.r-phylo.org/w/index.php?title=HowTo/InputtingTrees&amp;diff=466&amp;oldid=prev</id>
		<title>Hilmar: R Hackathon/InputtingTrees moved to HowTo/InputtingTrees</title>
		<link rel="alternate" type="text/html" href="https://www.r-phylo.org/w/index.php?title=HowTo/InputtingTrees&amp;diff=466&amp;oldid=prev"/>
		<updated>2008-02-06T19:02:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/w/index.php?title=R_Hackathon/InputtingTrees&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;R Hackathon/InputtingTrees (page does not exist)&quot;&gt;R Hackathon/InputtingTrees&lt;/a&gt; moved to &lt;a href=&quot;/wiki/HowTo/InputtingTrees&quot; title=&quot;HowTo/InputtingTrees&quot;&gt;HowTo/InputtingTrees&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:02, 6 February 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Hilmar</name></author>
	</entry>
	<entry>
		<id>https://www.r-phylo.org/w/index.php?title=HowTo/InputtingTrees&amp;diff=465&amp;oldid=prev</id>
		<title>Hilmar at 19:01, 6 February 2008</title>
		<link rel="alternate" type="text/html" href="https://www.r-phylo.org/w/index.php?title=HowTo/InputtingTrees&amp;diff=465&amp;oldid=prev"/>
		<updated>2008-02-06T19:01:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:01, 6 February 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The commands referenced below are all part of special phylogenetic packages in R, not the basic R install. Be sure that you have [[GettingStarted|installed and loaded the packages]] containing the commands referenced below before continuing. For example:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The commands referenced below are all part of special phylogenetic packages in R, not the basic R install. Be sure that you have [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;HowTo/&lt;/ins&gt;GettingStarted|installed and loaded the packages]] containing the commands referenced below before continuing. For example:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    library(ape)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    library(ape)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hilmar</name></author>
	</entry>
	<entry>
		<id>https://www.r-phylo.org/w/index.php?title=HowTo/InputtingTrees&amp;diff=464&amp;oldid=prev</id>
		<title>Hilmar at 19:01, 6 February 2008</title>
		<link rel="alternate" type="text/html" href="https://www.r-phylo.org/w/index.php?title=HowTo/InputtingTrees&amp;diff=464&amp;oldid=prev"/>
		<updated>2008-02-06T19:01:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The commands referenced below are all part of special phylogenetic packages in R, not the basic R install. Be sure that you have [[GettingStarted|installed and loaded the packages]] containing the commands referenced below before continuing. For example:&lt;br /&gt;
&lt;br /&gt;
   library(ape)&lt;br /&gt;
&lt;br /&gt;
This loads the package ape and its required packages, gee, nlme and lattice, into your R session. &lt;br /&gt;
&lt;br /&gt;
'''How do I input a phylogeny into R?'''&lt;br /&gt;
&lt;br /&gt;
Okay, so you've just completed a phylogenetic analysis or otherwise obtained a file containing a phylogeny, and you'd like to use that phylogeny as a framework for comparative analysis in R. There are several different phylogeny representations used in various R packages, but the most common is &amp;quot;phylo&amp;quot; (more specifically, objects of class &amp;quot;phylo&amp;quot;). Luckily, converting your phylogeny to &amp;quot;phylo&amp;quot; representation is easy.  &lt;br /&gt;
&lt;br /&gt;
The package APE can read phylogenies in either Newick or NEXUS format using the read.tree and read.nexus commands, respectively. (Note: we assume you have already placed these input trees in your working directory, see [https://www.nescent.org/wg_phyloinformatics/R_Hackathon/Basics the basics])&lt;br /&gt;
&lt;br /&gt;
   MyTree &amp;lt;- read.tree(&amp;quot;MyNewickTreefile.tre&amp;quot;)&lt;br /&gt;
   MyTree &amp;lt;- read.nexus(&amp;quot;MyNexusTreefile.nex&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Either of these commands will create an identical object called &amp;quot;MyTree&amp;quot; in R containing your phylogeny. This object is in &amp;quot;phylo&amp;quot; representation and it can be input to various other functions in R. &lt;br /&gt;
&lt;br /&gt;
Note that when you construct the original Newick or NEXUS files you should avoid enclosing your taxon names within quotes or using blank space within taxon names.  A taxon named Genus_species will work fine, one named &amp;quot;Genus species&amp;quot; will not. R and APE support the use of translation tables for taxon names in NEXUS format, but not in Newick format. &lt;br /&gt;
&lt;br /&gt;
'''How do I export a phylogeny out of R?'''&lt;br /&gt;
&lt;br /&gt;
APE can export phylogenies in phylo representation into either Newick or Nexus format using the write.tree and write.nexus commands, respectively.  &lt;br /&gt;
&lt;br /&gt;
   write.tree(MyTree, file=&amp;quot;MyNewickTreefile.tre&amp;quot;)&lt;br /&gt;
   write.nexus(MyTree, file=&amp;quot;MyNexusTreefile.nex&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
'''What if I'm working with multiple trees?'''&lt;br /&gt;
&lt;br /&gt;
No problem!  If the Newick or NEXUS file that you read into R contains multiple trees, an object called a list will be created. Each element of the list will be one individual tree from the original datafile. &lt;br /&gt;
&lt;br /&gt;
You can also write multiple trees to a single file from R.  If the trees are already in a list (perhaps one called MyTrees), the syntax is the same as above.&lt;br /&gt;
&lt;br /&gt;
   write.tree(MyTrees, file=&amp;quot;MyNewickTreefile.tre&amp;quot;)#Currently not possible&lt;br /&gt;
   &lt;br /&gt;
If trees are not in a list but exist instead as separate objects, you can type them as sequential arguments in write.tree and write.nexus.&lt;br /&gt;
&lt;br /&gt;
   write.tree(MyTree1, MyTree2, MyTree3, file=&amp;quot;MyNewickTreefile.tre&amp;quot;)#Currently not possible&lt;br /&gt;
   write.nexus(MyTree1, MyTree2, MyTree3, file=&amp;quot;MyNexusTreefile.nex&amp;quot;)#Currently possible&lt;br /&gt;
&lt;br /&gt;
However, be aware that many functions in R are designed to accept only a single tree as input, not a a list of trees. You can apply a single function to all the elements of a list sequentially using the lapply and sapply commands. For more information on the usage of lapply and sapply, type either of the following into the R command line.&lt;br /&gt;
&lt;br /&gt;
   help(lapply)&lt;br /&gt;
   help(sapply)&lt;br /&gt;
&lt;br /&gt;
Credit:  Most of the information on this page is paraphrased from the book Analysis of Phylogenetics and Evolution with R (Paradis, 2006).&lt;br /&gt;
&lt;br /&gt;
==Test stuff here==&lt;br /&gt;
===Example file attachments===&lt;br /&gt;
* rda doesn't work yet because the format is not: [[Media:geospiza.rda|rdafile]]&lt;br /&gt;
&lt;br /&gt;
[[Category:HowTo]]&lt;br /&gt;
[[Category:Comparative Methods Help]]&lt;/div&gt;</summary>
		<author><name>Hilmar</name></author>
	</entry>
</feed>