[med-svn] [r-cran-ape] 01/04: Imported Upstream version 3.2

Dylan Aïssi bob.dybian-guest at moszumanska.debian.org
Mon Dec 8 18:13:46 UTC 2014


This is an automated email from the git hooks/post-receive script.

bob.dybian-guest pushed a commit to branch master
in repository r-cran-ape.

commit 2685aff6a364d0e9cd9c441d938e6b4f81dc13b2
Author: Dylan Aïssi <bob.dybian at gmail.com>
Date:   Mon Dec 8 19:09:17 2014 +0100

    Imported Upstream version 3.2
---
 DESCRIPTION                |  18 ++--
 MD5                        |  70 +++++++------
 NAMESPACE                  |   4 +
 R/DNA.R                    |  27 ++++-
 R/ace.R                    |   2 +-
 R/def.R                    |  23 +++++
 R/dist.topo.R              |   1 -
 R/is.ultrametric.R         |   2 +-
 R/multi2di.R               |  16 +--
 R/nodepath.R               |  60 ++++++++++++
 R/phymltest.R              |   4 +-
 R/plot.phylo.R             |   4 +-
 R/read.nexus.R             |   8 +-
 R/read.tree.R              |   2 +-
 R/reconstruct.R            | 240 +++++++++++++++++++++++++++++++++++++++++++++
 R/rtt.R                    |   6 +-
 R/scales.R                 |  42 ++++----
 R/vcv.phylo.R              |   2 +-
 R/vcv2phylo.R              | 135 +++++++++++++++++++++++++
 R/write.nexus.data.R       | 176 ++++++++++++++-------------------
 build/vignette.rds         | Bin 192 -> 194 bytes
 data/hivtree.newick.rda    | Bin 2189 -> 2190 bytes
 data/landplants.newick.rda | Bin 575 -> 576 bytes
 data/opsin.newick.rda      | Bin 445 -> 446 bytes
 inst/doc/MoranI.pdf        | Bin 256526 -> 237986 bytes
 man/all.equal.phylo.Rd     |   4 +-
 man/ape-internal.Rd        |   6 ++
 man/as.alignment.Rd        |  32 +++++-
 man/axisPhylo.Rd           |   8 +-
 man/compar.lynch.Rd        |   2 +-
 man/corClasses.Rd          |   3 +-
 man/def.Rd                 |  63 ++++++++++++
 man/diversi.gof.Rd         |   6 +-
 man/mst.Rd                 |   2 +-
 man/nodepath.Rd            |  31 ++++++
 man/plot.phylo.Rd          |   1 +
 man/reconstruct.Rd         |  81 +++++++++++++++
 man/vcv.phylo.Rd           |   2 +-
 man/vcv2phylo.Rd           |  35 +++++++
 man/write.nexus.data.Rd    |  29 +++---
 40 files changed, 934 insertions(+), 213 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index d5208d6..e416714 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,12 +1,14 @@
 Package: ape
-Version: 3.1-4
-Date: 2014-07-15
+Version: 3.2
+Date: 2014-12-05
 Title: Analyses of Phylogenetics and Evolution
 Authors at R: c(person("Emmanuel", "Paradis", role = c("aut", "cre", "cph"), email = "Emmanuel.Paradis at ird.fr"),
+  person("Simon", "Blomberg", role = c("aut", "cph")),
   person("Ben", "Bolker", role = c("aut", "cph")),
   person("Julien", "Claude", role = c("aut", "cph")),
   person("Hoa Sien", "Cuong", role = c("aut", "cph")),
   person("Richard", "Desper", role = c("aut", "cph")),
+  person("Gilles", "Didier", role = c("aut", "cph")),
   person("Benoit", "Durand", role = c("aut", "cph")),
   person("Julien", "Dutheil", role = c("aut", "cph")),
   person("Olivier", "Gascuel", role = c("aut", "cph")),
@@ -19,22 +21,25 @@ Authors at R: c(person("Emmanuel", "Paradis", role = c("aut", "cre", "cph"), email
   person("Johan", "Nylander", role = c("aut", "cph")),
   person("Rainer", "Opgen-Rhein", role = c("aut", "cph")),
   person("Andrei-Alin", "Popescu", role = c("aut", "cph")),
+  person("Manuela", "Royer-Carenzi", role = c("aut", "cph")),
   person("Klaus", "Schliep", role = c("aut", "cph")),
   person("Korbinian", "Strimmer", role = c("aut", "cph")),
   person("Damien", "de Vienne", role = c("aut", "cph")))
 Depends: R (>= 3.0.0)
 Suggests: gee, expm
-Imports: nlme, lattice, graphics, stats, tools, utils
+Imports: nlme, lattice, graphics, stats, tools, utils, parallel
 ZipData: no
-Description: ape provides functions for reading, writing, plotting, and manipulating phylogenetic trees, analyses of comparative data in a phylogenetic framework, ancestral character analyses, analyses of diversification and macroevolution, computing distances from allelic and nucleotide data, reading and writing nucleotide sequences, and several tools such as Mantel's test, generalized skyline plots, graphical exploration of phylogenetic data (alex, trex, kronoviz), estimation of absolu [...]
+Description: ape provides functions for reading, writing, plotting, and manipulating phylogenetic trees, analyses of comparative data in a phylogenetic framework, ancestral character analyses, analyses of diversification and macroevolution, computing distances from allelic and nucleotide data, reading and writing nucleotide sequences as well as importing from BioConductor, and several tools such as Mantel's test, generalized skyline plots, graphical exploration of phylogenetic data (alex [...]
 License: GPL (>= 2)
 URL: http://ape-package.ird.fr/
-Packaged: 2014-07-15 08:04:40 UTC; paradis
+Packaged: 2014-12-04 21:10:22 UTC; paradis
 Author: Emmanuel Paradis [aut, cre, cph],
+  Simon Blomberg [aut, cph],
   Ben Bolker [aut, cph],
   Julien Claude [aut, cph],
   Hoa Sien Cuong [aut, cph],
   Richard Desper [aut, cph],
+  Gilles Didier [aut, cph],
   Benoit Durand [aut, cph],
   Julien Dutheil [aut, cph],
   Olivier Gascuel [aut, cph],
@@ -47,10 +52,11 @@ Author: Emmanuel Paradis [aut, cre, cph],
   Johan Nylander [aut, cph],
   Rainer Opgen-Rhein [aut, cph],
   Andrei-Alin Popescu [aut, cph],
+  Manuela Royer-Carenzi [aut, cph],
   Klaus Schliep [aut, cph],
   Korbinian Strimmer [aut, cph],
   Damien de Vienne [aut, cph]
 Maintainer: Emmanuel Paradis <Emmanuel.Paradis at ird.fr>
 NeedsCompilation: yes
 Repository: CRAN
-Date/Publication: 2014-07-15 11:13:25
+Date/Publication: 2014-12-05 17:18:03
diff --git a/MD5 b/MD5
index 732866e..70c2063 100644
--- a/MD5
+++ b/MD5
@@ -1,18 +1,18 @@
 eb723b61539feef013de476e68b5c50a *COPYING
-721805a828f28952c3b025b56cbe1b5c *DESCRIPTION
-1434ba4e31040404e8b049f75a705af5 *NAMESPACE
+85f4448ef7bc83a44650c96e66d1eec8 *DESCRIPTION
+c529a081c74a3eb99da54b438ee7f2b4 *NAMESPACE
 854a025cb7e5da3e4fe230c0be950d08 *NEWS
 0c7bc9101516fd26fb3ddbedbe25b6a3 *R/CADM.global.R
 e042efca1d8a00d4178204f5f481b64d *R/CADM.post.R
 5fd68920346c5aca7e7695fd9dbc1c3c *R/CDF.birth.death.R
 fdb9cfa0cbda82bda982b290693e44e3 *R/Cheverud.R
-f9400c37c74ed7d92838a27e19d8d12d *R/DNA.R
+94ab10b6cd1040fb0c4937da0f5f1a50 *R/DNA.R
 0fbc7715dfdc8d54ded16d78ca3100f8 *R/MPR.R
 bb95af56d882b6162aa517a77140175e *R/MoranI.R
 dd2d159ad60c382ecc7331ddb10b3e5b *R/PGLS.R
 a683ed4e25ad199edc7d30e7b55181a6 *R/SDM.R
 6b54088bf2514e3aa70edf05fe88127d *R/SlowinskiGuyer.R
-a21847e7a8b02d88840e9464bb04fe3b *R/ace.R
+a06252b90c1e32e72619858225f0b51d *R/ace.R
 4ce79cf3f3ff49bef989454d86d0c891 *R/additive.R
 9fca35b1005cce7b2a260b553dd971a3 *R/alex.R
 9fe874382f024a98f62a0ccfcd6d09ac *R/all.equal.phylo.R
@@ -40,9 +40,10 @@ af76fbb797185c9738442161a2c923b4 *R/compar.gee.R
 0092074917dc5631dc62fb9a3016145c *R/cophenetic.phylo.R
 13f2dac84d7b8a1da3df0e0c11b4ab1c *R/cophyloplot.R
 d5ae510a60a962ca6420366e3bc9cb1a *R/dbd.R
+3822f0bb0a9ed4c8c19654e86ef34359 *R/def.R
 93480a5b64e0d37f5450891629557615 *R/delta.plot.R
 dfd5bb35f1cb1fd9154d023e0e4cfc2b *R/dist.gene.R
-94a256e9220f68f0a8c72f029304055e *R/dist.topo.R
+3d29294945ed629de727745d614cc0dd *R/dist.topo.R
 b28ced504fedeb7f991f7eba10ad06df *R/diversi.gof.R
 8b2ec4004022afdc7e2cb42f2657b628 *R/diversi.time.R
 fd662cd4bbd6ce536ef379eca2e516ab *R/drop.tip.R
@@ -55,7 +56,7 @@ aa09abeb90ef891384128f978ffce843 *R/extract.popsize.R
 670971f4507c1138ca5d55cee936e4bc *R/is.binary.tree.R
 be075b35bb032eaca5946abd14ded1e3 *R/is.compatible.R
 35921387c705612d8f7c5baa06f9ab79 *R/is.monophyletic.R
-bea34df3719d1f2e1f772d813686af4b *R/is.ultrametric.R
+135e6538fd2db96b8bd39ad42d161506 *R/is.ultrametric.R
 6133e277d2594d94345e6f10789a3a3a *R/ladderize.R
 65b2494ebd918c6f9a31c80e25370035 *R/lmorigin.R
 b4c7ccf40ec0c69a21da38965747d350 *R/ltt.plot.R
@@ -67,17 +68,18 @@ d2c16632492bfafd2ee18f2fe3d3d64a *R/matexpo.R
 61021f7af1175c46a743c7fee4cdc87e *R/me.R
 e1327a592199bac7ac8f670c3a068d46 *R/mrca.R
 a078728fb5907565f85b54b30e5bf83f *R/mst.R
-baf380fc68864e9a4c3d07f5158d3722 *R/multi2di.R
+eb5dd3843951b8bde1b8d53ab2d1353a *R/multi2di.R
 0850fdd19c01d37ac632fc308632a463 *R/mvr.R
 282308c27ac1e78e330711d635d2e572 *R/nj.R
 e3f22d0f260c43be87a17b0ab091e2bb *R/njs.R
 080c82acd4a90a88a1bbd098ebfe6b60 *R/nodelabels.R
+ae2aeb0e8aef7f8d4b19939ca61b3482 *R/nodepath.R
 7425d422f7ca9b3966bb65a4e4336bbe *R/parafit.R
 fc0260f9e8e17fc1446117580bbc93cc *R/pcoa.R
 4999c85e82105ded85a214204321c3d1 *R/phydataplot.R
-f71b4d1a0cba643e7c5cbc6f01c0e9a1 *R/phymltest.R
+e71db002c66c277bfb57f6914ca143d4 *R/phymltest.R
 61d1360195bf4d5e6e2d8c30de335dc8 *R/pic.R
-57478ff610b5d0d3010c12ad17d968f8 *R/plot.phylo.R
+0b0507e9993d4a68aea85aa4ff1ac07b *R/plot.phylo.R
 e579ec65c808c29e1ecaae1501784b37 *R/plot.popsize.R
 736506e2f67e90cf9326abead437d298 *R/plotPhyloCoor.R
 1e2485437566ca9af99d93b4580cbbc2 *R/print.lmorigin.R
@@ -86,15 +88,16 @@ d0e8bd41d5acc217fdee3578adcf635b *R/print.parafit.R
 1895483cd4f45095860092900e0672c8 *R/read.GenBank.R
 b13dfb8f455b1c9e74a364085f72dbce *R/read.caic.R
 c1fc8ab4715f1d58145f533fbaf776e4 *R/read.dna.R
-fca9cd2c52414a936ab10a522136cf8a *R/read.nexus.R
+56361b2157d0afb1050233a6ab8ee1b5 *R/read.nexus.R
 13ce7f5c7d1bcb7101469d12651e99c8 *R/read.nexus.data.R
-8aefdf68a66fc5ad148b4d5211a285ed *R/read.tree.R
+23541fbea792b010f52b89735a660582 *R/read.tree.R
+86361682a3d477e8e63fff53dc67279e *R/reconstruct.R
 b1218f7862a66f566e4f3165f28fe47c *R/reorder.phylo.R
 a71f335ebf44985121b28bfcf86d698d *R/root.R
 f584366b32e7414c669714ba5b84951b *R/rotate.R
 b7158b84c7ee7d9dcb2e0abeb6005cb0 *R/rtree.R
-01db17803643af9627fbde7dcb34dd8b *R/rtt.R
-cee88a7a00b3a858c18a3299eef49b79 *R/scales.R
+0730a0bed794d8297576e732868d23ec *R/rtt.R
+d099c8987470c4506511be54e29a5ddd *R/scales.R
 d2e06f8288af941a00c46248b586225a *R/skyline.R
 1f82059f740388b7430b2359e54a147f *R/skylineplot.R
 9c7b02a4625099f715700fb868226b0f *R/speciesTree.R
@@ -105,17 +108,18 @@ fbbe3d3c1eec119690a296bfaff4b252 *R/summary.phylo.R
 b5081fca8758fe4458183c3e25e3e661 *R/triangMtd.R
 6e92716e8004feb088d5c093bad3828f *R/unique.multiPhylo.R
 2937379ad9e91e263b7956c264926466 *R/varcomp.R
-d2fef53445996fca1a2fca2d67f8dbb9 *R/vcv.phylo.R
+a40ae9ad30c221d4ed14b90e8b406f93 *R/vcv.phylo.R
+31b3bb1feed474692f07fcebe3a61ac7 *R/vcv2phylo.R
 16d5511c871e41b9b2673052e03c8b33 *R/which.edge.R
 aa484437bf64a39b737665b0769e320b *R/write.dna.R
 846c603fdb8bda22e5d3e2c81681221f *R/write.nexus.R
-2ac18a948dfca02a878b4ccf3a07b145 *R/write.nexus.data.R
+c2006919805d0628cacc83db2bb7eff0 *R/write.nexus.data.R
 17d72a136a8131ea46ef9a20fcfd4d36 *R/write.tree.R
 a918c086a449bcca5ccbb04f7e6d50a9 *R/yule.R
 c8d3aa3fe64e75e61af07a1b11c74f3f *R/yule.time.R
 1eb44ff9e5a036eb845faa1598ce5009 *R/zoom.R
 3387c0d0c1f913f8471e1bb34bd2e516 *R/zzz.R
-a98e7f16070ea2c3d9334626fddd2024 *build/vignette.rds
+2b7357b75c0beefb393056c925cc168e *build/vignette.rds
 db9083e8750aff839d5ebf3ed982f1f1 *data/HP.links.rda
 9d9f9232839665422709ded1e541d038 *data/bird.families.rda
 a14a6df0f3a735ebc056065077788c90 *data/bird.orders.rda
@@ -123,21 +127,21 @@ f74f9ed80c04756021cc093d40ca9ff9 *data/carnivora.csv.gz
 4eaf8cbaefa2e8f8d395a9b482ee9967 *data/chiroptera.rda
 1c74c3b99d08b0e17eea3ec1065c12d2 *data/cynipids.rda
 7fe760c2f3b4deba0554aae6138cb602 *data/gopher.D.rda
-c52ec1cde7c3f659aa4cb60a651a5e41 *data/hivtree.newick.rda
+f0fa8d1eab01b77eec3f4ec6552369f7 *data/hivtree.newick.rda
 8d14f95319d0a5cdc8faa60a1d0085ce *data/hivtree.table.txt.gz
-d9d51e474a3483004b33196c436811e4 *data/landplants.newick.rda
+cc483099ae0a0386f4b8c0e4905f15c8 *data/landplants.newick.rda
 31be81fe3faca11f98d3e74c090bc59e *data/lice.D.rda
 38edbd84a0a067322c40db8d71fb1289 *data/lmorigin.ex1.rda
 e3ce9e3444182fea2e65df2e150ea0db *data/lmorigin.ex2.rda
 ce7a56faebdf286fdf5ba6c8c3699a79 *data/mat3.RData
 e2d1339025ed901009bfed58dc6505ff *data/mat5M3ID.RData
 101d0ab2e981b0987cde704a2dee1d8d *data/mat5Mrand.RData
-7128cd7d6a1de5fabaa047ea73b038d2 *data/opsin.newick.rda
+b0bed24573a2dc201f9e82ab3dba6599 *data/opsin.newick.rda
 39e4fece2bdc527d7a9d4d83d023a947 *data/woodmouse.rda
 828290996b613493f96e0fab024beebb *inst/CITATION
 3f54f3775bcf382e25df2a12228894f6 *inst/doc/MoranI.R
 abf2e3e84707634e32f3e7cc6a5ee7ae *inst/doc/MoranI.Rnw
-b922a0a9d3e21916c3b63b59c8c74658 *inst/doc/MoranI.pdf
+b2ab7d195a318f9f10f2e3801c73ebfd *inst/doc/MoranI.pdf
 e6876b193a0df06697c788a8e48cf4bc *man/CADM.global.Rd
 060222d269ef45f0c7df76bb723e7d45 *man/DNAbin.Rd
 8b9bc214e32cde4c6e5970e48ff30c5f *man/Initialize.corPhyl.Rd
@@ -149,15 +153,15 @@ e63ecbd9a4cf6de364e595d5999e3a2e *man/MoranI.Rd
 60adac0f324c7b08a756d8f45c02b024 *man/add.scale.bar.Rd
 32d8ad6eeea971901aee33f1f654ae7c *man/additive.Rd
 0f37535a86413945bf3205b7a7b7c20b *man/alex.Rd
-9b59183f799d28e9a0f745ae7f098c48 *man/all.equal.phylo.Rd
-9d909782166d3e220550bdbb090c386f *man/ape-internal.Rd
+179ad4f32184a21ebd65564c41d0d02e *man/all.equal.phylo.Rd
+416c995c868f02d17fe9dc14a106b71c *man/ape-internal.Rd
 587cbd9d9a326b3990ed20bfe5016165 *man/ape-package.Rd
-e233fefd3f490b58b06f66886c8ee996 *man/as.alignment.Rd
+5bba4ae4bfc66b613855cfc182d9b1bc *man/as.alignment.Rd
 73c00aae390eaad1a86f3ede4a41e1a4 *man/as.bitsplits.Rd
 4f014cf2923e2eab6188acd48e8096fa *man/as.matching.Rd
 3a9546ce6447f5b6585b4bd58dc4c7f4 *man/as.phylo.Rd
 219cff7b94e167e18f4f9cd99cc8efc3 *man/as.phylo.formula.Rd
-42186fd973ac13c1d08f1e4d17023b87 *man/axisPhylo.Rd
+c1bb2b36369966cc61f802daa27921a2 *man/axisPhylo.Rd
 ad514b163e70bfbc11dfd34a450799f8 *man/balance.Rd
 868d03a447b2375bd9e99cde899cedea *man/base.freq.Rd
 524a1163eac56d1fc7f65bcd6c74a8d0 *man/bd.ext.Rd
@@ -182,7 +186,7 @@ cb0cdda41058b55d02b87df14c86f85e *man/clustal.Rd
 08dfcbd8455de6b872a63883e38f5813 *man/collapsed.intervals.Rd
 301f271dc131de2efc3294d31f03afed *man/compar.cheverud.Rd
 4d8ee141d7b6b323ef5ee9446000ae32 *man/compar.gee.Rd
-9c81cd968fdee8f940dd8423506051a8 *man/compar.lynch.Rd
+4317f601ba2eef4e5730dc4274172f0f *man/compar.lynch.Rd
 8b079bc165c375f823c40074ad9106c6 *man/compar.ou.Rd
 70a4c1daab3326b147758128826248d6 *man/compute.brlen.Rd
 dbb4b5b1d5136bd32660699d9d4cc197 *man/compute.brtime.Rd
@@ -191,19 +195,20 @@ cea3751e04bbda7eda58a8ca96466bac *man/consensus.Rd
 1ca9ec0cb824468adc03884c940c7aa3 *man/cophyloplot.Rd
 b83a1aa72b6b94ccd7e519eaba7def04 *man/corBlomberg.Rd
 a210fe55aacb847936004458d4089b6d *man/corBrownian.Rd
-66548afbe896087e95ed8446397015a6 *man/corClasses.Rd
+2ee5e8585f40c2beff6dc9ee993c22e1 *man/corClasses.Rd
 673c9738c6ff3e237e11d35d62629bcc *man/corGrafen.Rd
 628a4d6339f82e7ef3debe96d19ffa02 *man/corMartins.Rd
 202f26f668a8fc7973d50696dcdd6cd4 *man/corPagel.Rd
 d7eb9b4fdf7036e82b5964bfd85e5e36 *man/correlogram.formula.Rd
 c199605f9d353b303acad4896f9b39a5 *man/cynipids.Rd
 34164e368efd0d5d961fe62e9ede75e8 *man/dbd.Rd
+e7703bd85471f644eba7aad66a1c5ad8 *man/def.Rd
 e5fd45ae77e515b42d180a8c5369987d *man/del.gaps.Rd
 fbcd1d4bcf74e21fc93c195c7af3db98 *man/delta.plot.Rd
 e9a4068c29af95a6c2474192b3e1af1b *man/dist.dna.Rd
 38011e81d28a120d88eead09e62c154a *man/dist.gene.Rd
 a93e4fe0f50b5b8ded1b47cb9c76ec1f *man/dist.topo.Rd
-883eb866baf7f1eb68b52ba5aa123c8e *man/diversi.gof.Rd
+c7cc398115be066740ca4fb037394727 *man/diversi.gof.Rd
 d646ea0343999bd0e38e86dcf6c12018 *man/diversi.time.Rd
 0003bd93b9418ba7a7a4f89faf2f7338 *man/diversity.contrast.test.Rd
 55ed69cf42cb2fb768467870ef5e4c99 *man/drop.tip.Rd
@@ -236,7 +241,7 @@ a8b9d6b04d35d75f43d1b283361a1642 *man/mcconwaysims.test.Rd
 d47c22d9e889ae5c878940c41c59d31f *man/mcmc.popsize.Rd
 a3180429a5f137f1749180084d984257 *man/mixedFontLabel.Rd
 dbcdc231c2f1f221818307bb33486159 *man/mrca.Rd
-dcee2d8c67b0a19c27aa3d833f33f83b *man/mst.Rd
+5c88230ad597ea9fe41536a8321c326b *man/mst.Rd
 114f7834d51151cb6f92f8ed77becbcd *man/multi2di.Rd
 029b04adeafe89ea5edf9a1ab00cd154 *man/multiphylo.Rd
 00fb7ade93c2dd887be27e3dad8e2115 *man/mvr.Rd
@@ -244,6 +249,7 @@ dcee2d8c67b0a19c27aa3d833f33f83b *man/mst.Rd
 9ea7d5899a190171de4165e3240de62e *man/njs.Rd
 8f30d041ced38534477c2fac72fb1abf *man/node.depth.Rd
 ba754eba67181a1c39d417ffd9d23b76 *man/nodelabels.Rd
+447ae03684ff56a4a24932aec182acf3 *man/nodepath.Rd
 4f8b4cf2a725a8001e49390056181bef *man/opsin.Rd
 c2e2f35f4e233265c86b7967ec2d0630 *man/parafit.Rd
 89db814a5fc2e9fa5f0b9f4ad2f0d070 *man/pcoa.Rd
@@ -252,7 +258,7 @@ c2e2f35f4e233265c86b7967ec2d0630 *man/parafit.Rd
 447941526b92322c52b5cfe367cb7088 *man/pic.Rd
 0363aa3fa3e86160934e2359c8ac5323 *man/pic.ortho.Rd
 265527313d479d3625df7680c7479cd1 *man/plot.correlogram.Rd
-61a347b013548152104ed9786b3f499e *man/plot.phylo.Rd
+ae7dba067878a6546519c8cc84889dae *man/plot.phylo.Rd
 6bb1cf751772b9b6acf560b5f3c6f3c1 *man/plot.varcomp.Rd
 b24438c42cea969302ec6ba61002426e *man/print.phylo.Rd
 80bf68fd21b5e665329cf30b10a1655f *man/rTraitCont.Rd
@@ -264,6 +270,7 @@ b24438c42cea969302ec6ba61002426e *man/print.phylo.Rd
 5c9aed0b6f0a7e0f0fac9b5a59ac732f *man/read.nexus.Rd
 bc02e36c51d67074e661468993ed359b *man/read.nexus.data.Rd
 b1af1fd1362b66f6eae928bef96b38e8 *man/read.tree.Rd
+48d08588177df45a1e53dede1dc56bae *man/reconstruct.Rd
 61e0bc86ae5a1f04ee6e88cdc92a2089 *man/reorder.phylo.Rd
 af19f262b468dfd7c12448d9d8085331 *man/richness.yule.test.Rd
 a3cf7db0d79645f61aa15634b21a5c92 *man/rlineage.Rd
@@ -286,14 +293,15 @@ dbb269e680caf8c722cf53c9b5ce7ace *man/triangMtd.Rd
 9e7d047e16ff821f3b7254b92d027bf0 *man/unique.multiPhylo.Rd
 3fc83bd5ac2be01f581d0aa5a1038b80 *man/varCompPhylip.Rd
 196c20c5aad9b231c4736375e50b3de3 *man/varcomp.Rd
-904af4ee107d88d1bd1b57bca4a8d535 *man/vcv.phylo.Rd
+5c459720196654a10cfff0390bffc14f *man/vcv.phylo.Rd
+f7ce7760e913c10f1cb7be05315b39fc *man/vcv2phylo.Rd
 a5d3cbf19df84d0f1e4e3a4650945cbf *man/weight.taxo.Rd
 19d511057993a6335549d8e84f6ef86a *man/where.Rd
 ef9658f5343bdcbfc3673c7f936934f5 *man/which.edge.Rd
 f569d0058bc598bb92c42ef99a58f272 *man/woodmouse.Rd
 510a3ad17baa847a3f581e9d1babb534 *man/write.dna.Rd
 b9fe1836be61c56a521386b00021fa67 *man/write.nexus.Rd
-be1c4b4bb84b892598b4ba87582622c8 *man/write.nexus.data.Rd
+80e6bcbf556ad15770c7157aef3d28d8 *man/write.nexus.data.Rd
 b2302d65196726ab4cc573a22ee2d8e3 *man/write.tree.Rd
 2568c6529e40fae7effe88b6c73998a1 *man/yule.Rd
 7df89ac6996c82b52c4c9b3734807de1 *man/yule.cov.Rd
diff --git a/NAMESPACE b/NAMESPACE
index 42e8faa..f2627e1 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -125,7 +125,11 @@ S3method(print, parafit)
 
 S3method(as.DNAbin, alignment)
 S3method(as.DNAbin, character)
+S3method(as.DNAbin, DNAMultipleAlignment)
+S3method(as.DNAbin, DNAString)
+S3method(as.DNAbin, DNAStringSet)
 S3method(as.DNAbin, list)
+S3method(as.DNAbin, PairwiseAlignmentsSingleSubject)
 
 S3method(as.phylo, formula)
 S3method(as.phylo, hclust)
diff --git a/R/DNA.R b/R/DNA.R
index 6a06778..4fed6ce 100644
--- a/R/DNA.R
+++ b/R/DNA.R
@@ -1,4 +1,4 @@
-## DNA.R (2014-03-12)
+## DNA.R (2014-08-05)
 
 ##   Manipulations and Comparisons of DNA Sequences
 
@@ -404,7 +404,7 @@ dist.dna <- function(x, model = "K80", variance = FALSE, gamma = FALSE,
     d <- .C(dist_dna, x, as.integer(n), as.integer(s), imod,
             double(Ndist), BF, as.integer(pairwise.deletion),
             as.integer(variance), var, as.integer(gamma),
-            alpha, NAOK = TRUE)
+            as.double(alpha), NAOK = TRUE)
     if (variance) var <- d[[9]]
     d <- d[[5]]
     if (imod == 11) {
@@ -500,3 +500,26 @@ where <- function(x, pattern)
     }
     foo(x, pat, p) # if x is a vector
 }
+
+## conversions from BioConductor:
+
+.DNAString2DNAbin <- function(from)
+    as.DNAbin.character(strsplit(tolower(as.character(from)), "")[[1]])
+
+.DNAStringSet2DNAbin <- function(from)
+    structure(lapply(from, .DNAString2DNAbin), class = "DNAbin")
+
+.DNAAlignment2DNAbinMatrix <- function(from)
+    as.matrix(.DNAStringSet2DNAbin(as(from, "DNAStringSet")))
+
+## S3 versions:
+as.DNAbin.DNAString <- function(x, ...) .DNAString2DNAbin(x)
+as.DNAbin.DNAStringSet <- function(x, ...) .DNAStringSet2DNAbin(x)
+as.DNAbin.PairwiseAlignmentsSingleSubject <- function(x, ...) .DNAAlignment2DNAbinMatrix(x)
+as.DNAbin.DNAMultipleAlignment <- function(x, ...) .DNAAlignment2DNAbinMatrix(x)
+
+## S4 versions:
+## setAs("DNAString", "DNAbin", .DNAString2DNAbin)
+## setAs("DNAStringSet", "DNAbin", .DNAStringSet2DNAbin)
+## setAs("PairwiseAlignmentsSingleSubject", "DNAbin", .DNAAlignment2DNAbinMatrix)
+## setAs("DNAMultipleAlignment", "DNAbin", .DNAAlignment2DNAbinMatrix)
diff --git a/R/ace.R b/R/ace.R
index 7b5cd73..fd19340 100644
--- a/R/ace.R
+++ b/R/ace.R
@@ -319,7 +319,7 @@ anova.ace <- function(object, ...)
     X <- c(list(object), list(...))
     df <- sapply(lapply(X, "[[", "rates"), length)
     ll <- sapply(X, "[[", "loglik")
-    ## check if models are in correct order?
+    ## check if models are in correct order
     dev <- c(NA, 2*diff(ll))
     ddf <- c(NA, diff(df))
     table <- data.frame(ll, df, ddf, dev,
diff --git a/R/def.R b/R/def.R
new file mode 100644
index 0000000..dde2788
--- /dev/null
+++ b/R/def.R
@@ -0,0 +1,23 @@
+## def.R (2014-10-24)
+
+##   Definition of Vectors for Plotting or Annotating
+
+## Copyright 2014 Emmanuel Paradis
+
+## This file is part of the R-package `ape'.
+## See the file ../COPYING for licensing issues.
+
+def <- function(x, ..., default = NULL, regexp = FALSE)
+{
+    dots <- list(...)
+    if (is.null(default)) {
+        if (is.numeric(dots[[1L]])) default <- 1
+        if (is.character(dots[[1L]])) default <- "black"
+    }
+    foo <- if (regexp) function(vec, y) grep(y, vec) else function(vec, y) which(vec == y)
+    res <- rep(default, length(x))
+    nms <- names(dots)
+    for (i in seq_along(nms))
+        res[foo(x, nms[i])] <- dots[[i]]
+    res
+}
diff --git a/R/dist.topo.R b/R/dist.topo.R
index d2907df..d000da8 100644
--- a/R/dist.topo.R
+++ b/R/dist.topo.R
@@ -224,7 +224,6 @@ boot.phylo <- function(phy, x, FUN, B = 100, block = 1,
 
      if (rooted) {
         pp <- prop.part(boot.tree)
-        if (!rooted) pp <- postprocess.prop.part(pp)
         ans <- prop.clades(phy, part = pp, rooted = rooted)
     } else {
         phy <- reorder(phy, "postorder")
diff --git a/R/is.ultrametric.R b/R/is.ultrametric.R
index 792684f..cf72142 100644
--- a/R/is.ultrametric.R
+++ b/R/is.ultrametric.R
@@ -21,7 +21,7 @@ is.ultrametric <- function(phy, tol = .Machine$double.eps^0.5)
     EL <- phy$edge.length
 
     ## xx: vecteur donnant la distance d'un noeud
-    ##     ou d'un tip � partir de la racine
+    ##     ou d'un tip a partir de la racine
     xx <- numeric(n + phy$Nnode)
 
     ## the following must start at the root and follow the
diff --git a/R/multi2di.R b/R/multi2di.R
index 2f9b62b..fc598ca 100644
--- a/R/multi2di.R
+++ b/R/multi2di.R
@@ -1,8 +1,8 @@
-## multi2di.R (2010-01-23)
+## multi2di.R (2014-10-17)
 
 ##   Collapse and Resolve Multichotomies
 
-## Copyright 2005-2010 Emmanuel Paradis
+## Copyright 2005-2014 Emmanuel Paradis
 
 ## This file is part of the R-package `ape'.
 ## See the file ../COPYING for licensing issues.
@@ -14,7 +14,7 @@ multi2di <- function(phy, random = TRUE)
     if (!length(target)) return(phy)
     nb.edge <- dim(phy$edge)[1]
     n <- length(phy$tip.label)
-    nextnode <- n + phy$Nnode + 1
+    nextnode <- n + phy$Nnode + 1L
     new.edge <- edge2delete <- NULL
     wbl <- FALSE
     if (!is.null(phy$edge.length)) {
@@ -34,13 +34,13 @@ multi2di <- function(phy, random = TRUE)
             desc <- desc[tmp]
             res <- rtree(N)$edge
         } else {
-            res <- matrix(0, 2*N - 2, 2)
+            res <- matrix(0L, 2*N - 2, 2)
             res[, 1] <- N + rep(1:(N - 1), each = 2)
             res[, 2] <- N + rep(2:N, each = 2)
             res[seq(1, by = 2, length.out = N - 1), 2] <- 1:(N - 1)
             res[length(res)] <- N
         }
-        if (wbl) {
+       if (wbl) {
             ## keep the branch lengths coming from `node'
             el <- numeric(dim(res)[1]) # initialized with 0's
             el[res[, 2] <= N] <-
@@ -49,7 +49,7 @@ multi2di <- function(phy, random = TRUE)
         ## now substitute the nodes in `res'
         ## `node' stays at the "root" of these new
         ## edges whereas their "tips" are `desc'
-        Nodes <- c(node, seq(from = nextnode, length.out = N - 2))
+        Nodes <- c(node, nextnode:(nextnode + N - 3L))
         res[, 1] <- Nodes[res[, 1] - N]
         tmp <- res[, 2] > N
         res[tmp, 2] <- Nodes[res[tmp, 2] - N]
@@ -57,8 +57,8 @@ multi2di <- function(phy, random = TRUE)
         new.edge <- rbind(new.edge, res)
         edge2delete <- c(edge2delete, ind)
         if (wbl) new.edge.length <- c(new.edge.length, el)
-        nextnode <- nextnode + N - 2
-        phy$Nnode <- phy$Nnode + N - 2
+        nextnode <- nextnode + N - 2L
+        phy$Nnode <- phy$Nnode + N - 2L
     }
     phy$edge <- rbind(phy$edge[-edge2delete, ], new.edge)
     if (wbl)
diff --git a/R/nodepath.R b/R/nodepath.R
new file mode 100644
index 0000000..72153e4
--- /dev/null
+++ b/R/nodepath.R
@@ -0,0 +1,60 @@
+## nodepath.R (2014-11-06)
+
+##   Find Paths of Nodes
+
+## Copyright 2014 Emmanuel Paradis
+
+## This file is part of the R-package `ape'.
+## See the file ../COPYING for licensing issues.
+
+nodepath <- function(phy, from = NULL, to = NULL)
+{
+    if (!inherits(phy, "phylo"))
+        stop("object \"phy\" is not of class \"phylo\"")
+    n <- length(phy$tip.label)
+    m <- phy$Nnode
+    root2tip <- .Call(seq_root2tip, phy$edge, n, m)
+    if (is.null(from) || is.null(to)) return(root2tip)
+    if (from < 1 || from > n + m) stop("'from' out of range")
+    if (to < 1 || to > n + m) stop("'to' out of range")
+    if (from == to) return(to)
+
+    ## find the first occurrence of 'x' in the list root2tip
+    foo <- function(x) {
+        if (x <= n) return(x) # if x is a tip
+        if (x == n + 1L) return(1L) # if x is the root
+        i <- 1L
+        repeat {
+            if (any(root2tip[[i]] == x)) break
+            i <- i + 1L
+        }
+        i
+    }
+
+    i <- foo(from)
+    j <- foo(to)
+
+    ## find path of nodes in a single vector 'seq' from root2tip
+    findPath <- function(from, to, seq) {
+        i <- which(seq == from)
+        j <- which(seq == to)
+        seq[i:j]
+    }
+
+    if (i == j) return(findPath(from, to, root2tip[[i]]))
+
+    ## find the MRCA of 'from' and 'to'
+    A <- root2tip[[i]]
+    B <- root2tip[[j]]
+    MRCA <- n + 1L # start from the root
+    k <- 2L
+    repeat {
+        if (A[k] != B[k]) break
+        MRCA <- A[k]
+        k <- k + 1L
+    }
+
+    x <- findPath(MRCA, from, A)
+    y <- findPath(MRCA, to, B)
+    c(rev(x), y[-1])
+}
diff --git a/R/phymltest.R b/R/phymltest.R
index f98ec0f..6e603c6 100644
--- a/R/phymltest.R
+++ b/R/phymltest.R
@@ -1,4 +1,4 @@
-## phymltest.R (2014-06-16)
+## phymltest.R (2014-11-07)
 
 ##   Fits a Bunch of Models with PhyML
 
@@ -38,7 +38,7 @@ phymltest <- function(seqfile, format = "interleaved", itree = NULL,
     fmt <- rep("", N)
     if (format != "interleaved") fmt[] <- "-q"
     boot <- rep("-b 0", N) # to avoid any testing
-    mdl <- paste("-m", rep(c("JC69", "K80", "F81", "HKY85", "F84", "TN93", "GTR"), each = 4))
+    mdl <- paste("-m", rep(c("JC69", "K80", "F81", "F84", "HKY85", "TN93", "GTR"), each = 4)) # fix by Luiz Max Fagundes de Carvalho
     tstv <- rep("-t e", N) # ignored by PhyML with JC69 or F81
     inv <- rep(c("", "-v e"), length.out = N)
     ## no need to use the -c option of PhyML (4 categories by default if '-a e' is set):
diff --git a/R/plot.phylo.R b/R/plot.phylo.R
index 3106dc6..9c17ca0 100644
--- a/R/plot.phylo.R
+++ b/R/plot.phylo.R
@@ -1,4 +1,4 @@
-## plot.phylo.R (2014-05-07)
+## plot.phylo.R (2014-08-21)
 
 ##   Plot Phylogenies
 
@@ -436,7 +436,7 @@ if (plot) {
               cex = cex, adj = adj, srt = srt, no.margin = no.margin,
               label.offset = label.offset, x.lim = x.lim, y.lim = y.lim,
               direction = direction, tip.color = tip.color,
-              Ntip = Ntip, Nnode = Nnode)
+              Ntip = Ntip, Nnode = Nnode, root.time = x$root.time)
     assign("last_plot.phylo", c(L, list(edge = xe, xx = xx, yy = yy)),
            envir = .PlotPhyloEnv)
     invisible(L)
diff --git a/R/read.nexus.R b/R/read.nexus.R
index a3b7d4d..abaa540 100644
--- a/R/read.nexus.R
+++ b/R/read.nexus.R
@@ -1,4 +1,4 @@
-## read.nexus.R (2014-04-09)
+## read.nexus.R (2014-10-20)
 
 ##   Read Tree File in Nexus Format
 
@@ -152,11 +152,11 @@ read.nexus <- function(file, tree.names = NULL)
     }
     start <-
         if (translation) semico[semico > i2][1] + 1
-        else semico[semico > i1][1]
+        else i1 + 1 # semico[semico > i1][1] ## fix done on 2014-08-25
     end <- endblock[endblock > i1][1] - 1
     tree <- X[start:end]
     rm(X)
-###    tree <- gsub("^.*= *", "", tree)
+
     ## check whether there are empty lines from the above manips:
     tree <- tree[tree != ""]
     semico <- grep(";", tree)
@@ -183,7 +183,7 @@ read.nexus <- function(file, tree.names = NULL)
     Ntree <- length(STRING) # update Ntree
     ## get the tree names:
     nms.trees <- sub(" *= *.*", "", STRING) # only the first occurence of "="
-    nms.trees <- sub("^ *tree *", "", nms.trees, ignore.case = TRUE)
+    nms.trees <- sub("^[[:blank:]]*tree[[:blank:]\\*]*", "", nms.trees, ignore.case = TRUE) # fix by Graham Gower (2014-10-20)
     STRING <- sub("^.*= *", "", STRING) # delete title and 'TREE' command with 'sub'
     STRING <- gsub(" ", "", STRING) # delete all white spaces
     colon <- grep(":", STRING)
diff --git a/R/read.tree.R b/R/read.tree.R
index 47a432c..391ed73 100644
--- a/R/read.tree.R
+++ b/R/read.tree.R
@@ -130,7 +130,7 @@ read.tree <- function(file = "", text = NULL, tree.names = NULL, skip = 0,
     y <- which(tree == ";")
     Ntree <- length(y)
     x <- c(1, y[-Ntree] + 1)
-    ## Suggestion from Olivier Fran�ois (added 2006-07-15):
+    ## Suggestion from Olivier Francois (added 2006-07-15):
     if (is.na(y[1])) return(NULL)
     STRING <- character(Ntree)
     for (i in 1:Ntree)
diff --git a/R/reconstruct.R b/R/reconstruct.R
new file mode 100644
index 0000000..50055ea
--- /dev/null
+++ b/R/reconstruct.R
@@ -0,0 +1,240 @@
+## reconstruct.R (2014-10-24)
+
+##   Ancestral Character Estimation
+
+## Copyright 2014 Manuela Royer-Carenzi, Didier Gilles
+
+## This file is part of the R-package `ape'.
+## See the file ../COPYING for licensing issues.
+
+#renvoie la racine d'arbre
+racine <- function(arbre) {
+    Ntip(arbre) + 1
+}
+
+# renvoie une liste dont la premiere composante est l'arbre renumerote
+# de telle sorte que l'index d'un enfant est superieur a celui de son pere,
+# la seconde compopsante est la fonction de l'index initial vers le second,
+# et la troisieme son inverse
+# (attention probleme pour l'image de 0 mise a l'image du max)
+#
+renumeroteArbre <- function(arbre) {
+  m <- Ntip(arbre) + Nnode(arbre)
+  v<-numeric(m)
+  t<-numeric(m)
+  stack<-numeric(m)
+  istack<-1
+  stack[istack]<-racine(arbre)
+  codeI<-1
+  codeL<-Nnode(arbre)+1
+  while(istack>0){
+    cour<-stack[istack]
+    istack<-istack-1
+    l <- which(arbre$edge[, 1] == cour)
+    if(length(l)>0){
+      v[cour] <- codeI
+      t[codeI] <- cour
+      codeI <- codeI+1
+      for(i in 1:length(l)) {
+	istack<-istack+1
+	stack[istack] <- arbre$edge[l[i], 2]
+      }
+    } else {
+      v[cour] <- codeL
+      t[codeL] <- cour
+      codeL <- codeL+1
+    }
+  }
+  arbrebis<-arbre
+#renumeroter les noms
+  for(i in 1:Nedge(arbre)) {
+    arbrebis$edge[i,1] <- v[arbre$edge[i,1]]
+    arbrebis$edge[i,2] <- v[arbre$edge[i,2]]
+  }
+  l <- list(arbre = arbrebis, cod = v, dec = t)
+  l
+}
+
+#calcule la matrice C selon le modele BM
+#
+calculeC <- function(arbre) {
+  m <- Ntip(arbre) + Nnode(arbre)
+  C <- matrix(0,nrow=m,ncol=m)
+  for(i in 1:(m)) {
+    l <- which(arbre$edge[, 2] == i)
+    if(length(l)>0){
+      for(j in 1:(m)) {
+	C[j,i] <- C[j, arbre$edge[l[1], 1]]
+      }
+    }
+    C[i,i]<-1;
+  }
+  t(C)
+}
+
+
+
+
+
+#########################
+#calcul Variance
+#########################
+
+getSumSquare <- function(value, arbre) {
+ sum <- 0.
+ for(eu in 1:Nedge(arbre))
+   sum <- sum + (value[arbre$edge[eu,2]]-value[arbre$edge[eu,1]])^2/arbre$edge.length[eu]
+ sum
+}
+
+
+getMLHessian <- function(value, arbre) {
+   sumSqu <- getSumSquare(value, arbre)
+   nI <- Nnode(arbre)
+   nT <- length(arbre$tip.label)
+   nE <- nI+nT-1
+   sizeH<-nI+1
+   hessian <- matrix(0., nrow=sizeH, ncol=sizeH)
+   var <- sumSqu/nE
+   sd <- sqrt(var)
+   hessian[1,1] <- -nE/(2*var^2)+sumSqu/var^3
+   for(i in 1:nI) {
+     	child <- which(arbre$edge[, 1] == nT+i)
+  	if(length(child)>0) {
+      		for(j in 1:length(child)) {
+     		hessian[1,i+1] <- hessian[1,i+1]-(value[arbre$edge[child[j],2]]-value[nT+i])/arbre$edge.length[child[j]]
+      		hessian[i+1,i+1] <- hessian[i+1,i+1]+1./arbre$edge.length[child[j]]
+       		if(arbre$edge[child[j],2]>nT)
+		  hessian[i+1,arbre$edge[child[j],2]-nT+1] <- -1./(var*arbre$edge.length[child[j]])
+      		}
+     	}
+      	anc <- which(arbre$edge[, 2] == nT+i)
+     	if(length(anc)>0) {
+     	 	for(j in 1:length(anc)) {
+       		hessian[1,i+1] <- hessian[1,i+1]+(value[nT+i]-value[arbre$edge[anc[j],1]])/arbre$edge.length[anc[j]]
+     		hessian[i+1,i+1] <- hessian[i+1,i+1]+1./arbre$edge.length[anc[j]]
+       		hessian[i+1,arbre$edge[anc[j],1]-nT+1] <- -1./(var*arbre$edge.length[anc[j]])
+      		}
+     	}
+   hessian[1,i+1] <- -hessian[1,i+1]/sd^2
+   hessian[i+1,1] <- hessian[1,i+1]
+   hessian[i+1,i+1] <- hessian[i+1,i+1]/var
+   }
+   hessian
+}
+
+getREMLHessian <- function(value, arbre, sigma2) {
+   nI <- Nnode(arbre)
+   nT <- length(arbre$tip.label)
+   sizeH<-nI
+   hessian <- matrix(0., nrow=sizeH, ncol=sizeH)
+   for(i in 1:nI) {
+     	child <- which(arbre$edge[, 1] == nT+i)
+  	if(length(child)>0) {
+      		for(j in 1:length(child)) {
+      		hessian[i,i] <- hessian[i,i]+1./arbre$edge.length[child[j]]
+       		if(arbre$edge[child[j],2]>nT)
+		  hessian[i,arbre$edge[child[j],2]-nT] <- -1./(sigma2*arbre$edge.length[child[j]])
+      		}
+     	}
+      	anc <- which(arbre$edge[, 2] == nT+i)
+     	if(length(anc)>0) {
+     	 	for(j in 1:length(anc)) {
+      		hessian[i,i] <- hessian[i,i]+1./arbre$edge.length[anc[j]]
+       		hessian[i,arbre$edge[anc[j],1]-nT] <- -1./(sigma2*arbre$edge.length[anc[j]])
+      		}
+     	}
+      hessian[i,i] <- hessian[i,i]/sigma2
+   }
+   hessian
+}
+
+
+
+reconstruct <- function (x, phyInit, method = "ML", CI = TRUE) {
+ if (!inherits(phyInit, "phylo"))
+  stop("object \"phy\" is not of class \"phylo\"")
+ if (is.null(phyInit$edge.length))
+  stop("tree has no branch lengths")
+ nN <- phyInit$Nnode
+ nT <- length(x)
+#renumber tree
+ transf <- renumeroteArbre(phyInit)
+ phy <- transf$arbre
+ vY <- x
+ for (iF in 1:nT) {
+  indT <- transf$cod[iF] - nN
+  vY[indT] <- x[iF]
+  names(vY)[indT]  <- names(x)[iF]
+ }
+ LongBranche <- phy$edge.length
+ Fils <- phy$edge[,2]
+ Tau <- phy$edge.length[order(phy$edge[,2])]
+ vJ <- rep(1, length=nT)
+ sigmaAcc <- Tau
+ V2Acc <- diag(sigmaAcc)
+ CABM <- calculeC(phy)
+ C <- CABM[2:(nN+nT), 2:(nN+nT)]
+ sigmaNoeuds <- C %*% V2Acc %*% t(C)
+ sigma11 <- sigmaNoeuds[(1:(nN-1)), (1:(nN-1))]
+ sigma22 <- sigmaNoeuds[(nN:(nN+nT-1)) , (nN:(nN+nT-1)) ]
+ sigma12 <- sigmaNoeuds[(1:(nN-1)), (nN:(nN+nT-1)) ]
+ sigma21 <- sigmaNoeuds[(nN:(nN+nT-1)) , (1:(nN-1))]
+ GM <- solve( t(vJ) %*% solve(sigma22) %*% vJ ) %*% t(vJ) %*% solve(sigma22) %*% vY
+ ZA <- rep(GM, length=nN-1)+ sigma12 %*% solve(sigma22) %*% (vY-rep(GM, length=nT))
+ Intern <- c(GM, ZA)
+ ValueTmp <- c(Intern, vY)
+ Value <- ValueTmp
+ for(iF in 1:(nN+nT)) {
+  Value[transf$dec[iF]] <- ValueTmp[iF]
+ }
+ switch(method,
+  ML = {
+   Hessian <- getMLHessian(Value, phyInit)
+   se <- sqrt(diag(solve(Hessian)))
+   se <- se[-1]
+   tmp <- se*qt(0.025, nN)
+  },
+  REML={
+   minusLogLik <- function(sig2) {
+    if (sig2 < 0) return(1e+100)
+    V <- sig2 * vcv(phyInit)
+    distval <- stats::mahalanobis(x, center = mu, cov = V)
+    logdet <- sum(log(eigen(V, symmetric = TRUE, only.values = TRUE)$values))
+    (nT * log(2 * pi) + logdet + distval)/2
+   }
+   mu <- rep(GM, nT)
+   out <- nlm(minusLogLik, 1, hessian = FALSE)
+   sigma2 <- out$estimate
+   Hessian <- getREMLHessian(Value, phyInit, sigma2)
+   se <- sqrt(diag(solve(Hessian)))
+   tmp <- se*qt(0.025, nN)
+  },
+  GLS = {
+   Hessian <- (sigma11 - sigma12 %*% solve(sigma22) %*% t(sigma12))
+   seTmp <- c(0, sqrt(diag(Hessian)))
+   se <- seTmp
+   for(iF in 1:nN) {
+    se[iF] <- seTmp[transf$cod[iF+nT]]
+   }
+   tmp <- se*qnorm(0.025)
+  }
+ )
+ InternOP <- Intern
+ for (iF in 1:nN) {
+  InternOP[iF] <- Value[iF+nT]
+ }
+ CI95 <- cbind(lower=InternOP+tmp, upper=InternOP-tmp)
+if (CI==TRUE)
+ list(ace=InternOP, CI95=CI95)
+else
+  list(ace=InternOP)
+}
+
+
+
+
+
+
+
+
diff --git a/R/rtt.R b/R/rtt.R
index 8006f52..3be78db 100644
--- a/R/rtt.R
+++ b/R/rtt.R
@@ -7,12 +7,8 @@
 ## This file is part of the R-package `ape'.
 ## See the file ../COPYING for licensing issues.
 
-if (getRversion() >= "2.15.1") utils::globalVariables("mclapply")
-
 rtt <- function(t, tip.dates, ncpu = 1, objective = "correlation", opt.tol = .Machine$double.eps^0.25)
 {
-    if (ncpu > 1) library(parallel)
-
     ## These are objective functions which can be used to evaluate the "goodness" of
     ## a regression fit.
     if (objective == "correlation")
@@ -29,7 +25,7 @@ rtt <- function(t, tip.dates, ncpu = 1, objective = "correlation", opt.tol = .Ma
 
     ## Do root-to-tip regressions for every possible choice of root.
     fits <- if (ncpu > 1)
-        unlist(mclapply(1:nrow(dist), function(row) objective(tip.dates, dist[row, ]),
+        unlist(parallel::mclapply(1:nrow(dist), function(row) objective(tip.dates, dist[row, ]),
                                       mc.cores = ncpu))
         else unlist(lapply(1:nrow(dist), function(row) objective(tip.dates, dist[row, ])))
 
diff --git a/R/scales.R b/R/scales.R
index fc43a6b..318e97c 100644
--- a/R/scales.R
+++ b/R/scales.R
@@ -1,11 +1,11 @@
-## scales.R (2013-12-20)
+## scales.R (2014-08-21)
 
 ##   Add a Scale Bar or Axis to a Phylogeny Plot
 
 ## add.scale.bar: add a scale bar to a phylogeny plot
 ## axisPhylo: add a scale axis on the side of a phylogeny plot
 
-## Copyright 2002-2013 Emmanuel Paradis
+## Copyright 2002-2014 Emmanuel Paradis
 
 ## This file is part of the R-package `ape'.
 ## See the file ../COPYING for licensing issues.
@@ -72,7 +72,7 @@ add.scale.bar <- function(x, y, length = NULL, ask = FALSE,
            })
 }
 
-axisPhylo <- function(side = 1, ...)
+axisPhylo <- function(side = 1, root.time = NULL, backward = TRUE, ...)
 {
     lastPP <- get("last_plot.phylo", envir = .PlotPhyloEnv)
     type <- lastPP$type
@@ -82,23 +82,29 @@ axisPhylo <- function(side = 1, ...)
     if (type == "radial")
         stop("axisPhylo() not meaningful for this type of plot")
 
+    if (is.null(root.time)) root.time <- lastPP$root.time
+
     if (type %in% c("phylogram", "cladogram")) {
-        if (lastPP$direction %in% c("rightwards", "leftwards")) {
-            x <- pretty(lastPP$xx)
-            if (lastPP$direction == "rightwards") maxi <- max(lastPP$xx)
-            else {
-                maxi <- min(lastPP$xx)
-                x <- -x
-            }
-        } else {
-            x <- pretty(lastPP$yy)
-            if (lastPP$direction == "upwards") maxi <- max(lastPP$yy)
-            else {
-                maxi <- min(lastPP$yy)
-                x <- -x
-            }
+        xscale <-
+            if (lastPP$direction %in% c("rightwards", "leftwards")) range(lastPP$xx)
+            else range(lastPP$yy)
+
+        tmp <- lastPP$direction %in% c("leftwards", "downwards")
+
+        tscale <- c(0, xscale[2] - xscale[1])
+        if (xor(backward, tmp)) tscale <- tscale[2:1]
+        if (!is.null(root.time)) {
+            tscale <- tscale + root.time
+            if (backward) tscale <- tscale - xscale[2]
         }
-        axis(side = side, at = c(maxi - x), labels = abs(x), ...)
+
+        ## the linear transformation between the x-scale and the time-scale:
+        beta <- diff(xscale) / diff(tscale)
+        alpha <- xscale[1] - beta * tscale[1]
+
+        lab <- pretty(tscale)
+        x <- beta * lab + alpha
+        axis(side = side, at = x, labels = lab, ...)
     } else { # type == "fan"
         n <- lastPP$Ntip
         xx <- lastPP$xx[1:n]; yy <- lastPP$yy[1:n]
diff --git a/R/vcv.phylo.R b/R/vcv.phylo.R
index 0b70029..1bf1ba2 100644
--- a/R/vcv.phylo.R
+++ b/R/vcv.phylo.R
@@ -24,7 +24,7 @@ vcv.phylo <- function(phy, model = "Brownian", corr = FALSE, ...)
     EL <- phy$edge.length
 
     ## xx: vecteur donnant la distance d'un noeud
-    ##     ou d'un tip à partir de la racine
+    ##     ou d'un tip a partir de la racine
     ## (same than in is.ultrametric)
     xx <- numeric(n + phy$Nnode)
 
diff --git a/R/vcv2phylo.R b/R/vcv2phylo.R
new file mode 100644
index 0000000..7b54fa8
--- /dev/null
+++ b/R/vcv2phylo.R
@@ -0,0 +1,135 @@
+## vcv2phylo.R (2014-11-27)
+
+##   Variance-Covariance Matrix to Tree
+
+## Copyright 2014 Simon Blomberg
+
+## This file is part of the R-package `ape'.
+## See the file ../COPYING for licensing issues.
+
+vcv2phylo <- function (mat, tolerance = 1e-7)
+{
+  #########################################################
+  ## Program to reconstruct a phylogenetic tree          ##
+  ## from a phylogenetic variance-covariance matrix.     ##
+  ## Input: mat (is tested for positive-definiteness)    ##
+  ## Output: phylo (in phylo format as in package "ape") ##
+  ## If numerical issues occur, adjust the tolerance.    ##
+  ## Author: S. P. Blomberg                              ##
+  ## Date: 12th November 2010                            ##
+  #########################################################
+
+  make.node <- function (left, right, value, lbrlen, rbrlen) {
+    # function to make a node, using lists
+    the.node <- list(left=left, right=right, value=value, lbrlen=lbrlen,
+                     rbrlen=rbrlen)
+    class(the.node) <- c("node", "list")
+    return(the.node)
+  }
+
+  divide.matrix <- function (mat) {
+    # function to decompose a block-diagonal matrix into
+    # upper and lower blocks
+
+    dims <- dim(mat)[1]
+    end.of.block <- which(mat[1,] < tolerance)[1]-1
+    if (is.na(end.of.block)) stop("Matrix is not block-diagonal")
+    matlist <- list(upper=mat[1:end.of.block, 1:end.of.block],
+                    lower=mat[(end.of.block+1):dims,(end.of.block+1):dims])
+    if (length(matlist$upper)==1) names(matlist$upper) <- rownames(mat)[1]
+    if (length(matlist$lower)==1) names(matlist$lower) <- rownames(mat)[dims]
+    return(matlist)
+  }
+
+  make.tree.rec <- function (mat) {
+    # Recursive function to create a tree made of nodes
+    # from a phylogenetic matrix
+
+    matlist <- divide.matrix(mat)
+    if (is.vector(matlist$upper) && is.vector(matlist$lower)) {
+      left <- as.numeric(names(matlist$upper))
+      right <- as.numeric(names(matlist$lower))
+      value <- i
+      lbrlen <- matlist$upper
+      rbrlen <- matlist$lower
+    }
+    if (is.vector(matlist$upper) && is.matrix(matlist$lower)) {
+      min.lower <- min(matlist$lower)
+      left <- as.numeric(names(matlist$upper))
+      value <- i
+      i <<- i+1
+      right <- Recall(matlist$lower-min.lower)
+      lbrlen <- matlist$upper
+      rbrlen <- min.lower
+    }
+    if (is.matrix(matlist$upper) && is.vector(matlist$lower)) {
+      min.upper <- min(matlist$upper)
+      value <- i
+      i <<- i+1
+      left <- Recall(matlist$upper-min.upper)
+      right <- as.numeric(names(matlist$lower))
+      lbrlen <- min.upper
+      rbrlen <- matlist$lower
+    }
+    if (is.matrix(matlist$upper) && is.matrix(matlist$lower)) {
+      min.upper <- min(matlist$upper)
+      min.lower <- min(matlist$lower)
+      value <- i
+      i <<- i+1
+      left <- Recall(matlist$upper-min.upper)
+      i <<- i+1
+      right <- Recall(matlist$lower-min.lower)
+      lbrlen <- min.upper
+      rbrlen <- min.lower
+    }
+    return(make.node(left, right, value, lbrlen, rbrlen))
+  }
+
+  make.phylo.rec <- function (the.list) {
+    # Recursive function to construct the edge matrix and collect the
+    # branch length information from the tree
+    brlens <<- c(brlens, the.list$lbrlen, the.list$rbrlen)
+    if (is.numeric(the.list$left) && is.numeric(the.list$right)) {
+      the.matrix <<- rbind(the.matrix, c(the.list$value, the.list$left),
+                           c(the.list$value, the.list$right))
+    }
+    if (is.numeric(the.list$left) && inherits(the.list$right, "node")) {
+      the.matrix <<- rbind(the.matrix, c(the.list$value, the.list$left),
+                           c(the.list$value, the.list$right$value))
+      Recall(the.list$right)
+    }
+    if (inherits(the.list$left, "node") && is.numeric(the.list$right)) {
+        the.matrix <<- rbind(the.matrix, c(the.list$value, the.list$left$value),
+                             c(the.list$value, the.list$right))
+        Recall(the.list$left)
+      }
+    if (inherits(the.list$left, "node") && inherits(the.list$right, "node")) {
+      the.matrix <<- rbind(the.matrix, c(the.list$value, the.list$left$value),
+                           c(the.list$value, the.list$right$value))
+      Recall(the.list$left)
+      Recall(the.list$right)
+    }
+  }
+
+  # main body
+  #require(matrixcalc)
+  #if (!is.positive.definite(mat)) stop("Matrix is not positive-definite")
+  if (!isSymmetric(mat)) stop("Matrix is not symmetric")
+  if (any(eigen(mat, only.values = TRUE)$values < -tolerance))
+    stop("Matrix is not positive-definite")
+  sp.names <- rownames(mat)
+  dims <- dim(mat)[1]
+  rownames(mat) <- colnames(mat) <- 1:dims
+  i <- dims+1
+  the.list <- make.tree.rec(mat) # side effect: calculate i
+  the.matrix <- matrix(NA, 0, ncol=2) # initialise the edge matrix
+  brlens <- vector(mode="numeric", length=0) #initialise branch length vector
+  make.phylo.rec(the.list) # side effects: calculate the.matrix and brlens
+  names(brlens) <- NULL
+  phylo <- list(edge=the.matrix, tip.label=sp.names, edge.length=brlens, Nnode=i-dims)
+  storage.mode(phylo$edge) <- "integer"
+  storage.mode(phylo$Nnode) <- "integer"
+  class(phylo) <- "phylo"
+  return(phylo)
+}
+
diff --git a/R/write.nexus.data.R b/R/write.nexus.data.R
index deae1f8..0223c76 100644
--- a/R/write.nexus.data.R
+++ b/R/write.nexus.data.R
@@ -1,15 +1,20 @@
-"write.nexus.data" <- function (x, file, format = "dna", datablock = TRUE,
-                                interleaved = TRUE, charsperline = NULL,
-                                gap = NULL, missing = NULL) 
+## write.nexus.data.R (2014-09-24)
+
+##   Write Character Data in NEXUS Format
+
+## Copyright 2006-2014 Johan Nylander, Emmanuel Paradis
+
+## This file is part of the R-package `ape'.
+## See the file ../COPYING for licensing issues.
+
+write.nexus.data <-
+    function(x, file, format = "dna", datablock = TRUE,
+             interleaved = TRUE, charsperline = NULL,
+             gap = NULL, missing = NULL)
 {
-    # Nexus data parser.
-    #
-    # Version: 09/13/2006 09:06:33 AM CEST
-    #
-    # By:      Johan Nylander, nylander @ scs.fsu.edu
-    #
-    # TODO:    Standard data, mixed data, nice indent
-    #------------------------------------------------------------------
+### TODO: Standard data, mixed data, nice indent
+
+    format <- match.arg(toupper(format), c("DNA", "PROTEIN"))
 
     indent          <- "  "  # Two blanks
     maxtax          <- 5     # Max nr of taxon names to be printed on a line
@@ -17,151 +22,118 @@
     defgap          <- "-"   # Default gap character
     defmissing      <- "?"   # Default missing data character
 
+    if (is.matrix(x)) {
+        if (inherits(x, "DNAbin")) x <- as.list(x) else {
+            xbak <- x
+            x <- vector("list", nrow(xbak))
+            for (i in seq_along(x)) x[[i]] <- xbak[i, ]
+            names(x) <- rownames(xbak)
+            rm(xbak)
+        }
+    }
+
     ntax <- length(x)
     nchars <- length(x[[1]])
+
     zz <- file(file, "w")
 
-    if (is.null(names(x))) {
-        names(x) <- as.character(1:ntax)
-    }
+    if (is.null(names(x))) names(x) <- as.character(1:ntax)
 
-    "fcat" <- function (..., file = zz)
-    {
+    fcat <- function(..., file = zz)
         cat(..., file = file, sep = "", append = TRUE)
-    }
 
-    "find.max.length" <- function (x)
-    {
-        max <- 0
-        for (i in 1:length(x)) {
-           val <- length((strsplit(x[i], split = NULL))[[1]])
-           if (val > max) {
-               max <- val
-           }
-        }
-        max
-    }
+    find.max.length <- function(x) max(nchar(x))
 
-    "print.matrix" <- function(x, dindent = "    ")
-    {
+    print.matrix <- function(x, dindent = "    ") {
         Names <- names(x)
         printlength <- find.max.length(Names) + 2
-        if (interleaved == FALSE) {
-            for (i in 1:length(x)) {
+        if (!interleaved) {
+            for (i in seq_along(x)) {
                 sequence <- paste(x[[i]], collapse = "")
                 taxon <- Names[i]
                 thestring <- sprintf("%-*s%s%s", printlength, taxon, dindent, sequence)
                 fcat(indent, indent, thestring, "\n")
             }
-        }
-        else {
+        } else {
             ntimes <- ceiling(nchars/charsperline)
             start <- 1
             end <- charsperline
-            for (j in 1:ntimes) {
-                for (i in 1:length(x)) {
+            for (j in seq_len(ntimes)) {
+                for (i in seq_along(x)) {
                     sequence <- paste(x[[i]][start:end], collapse = "")
                     taxon <- Names[i]
                     thestring <- sprintf("%-*s%s%s", printlength, taxon, dindent, sequence)
                     fcat(indent, indent, thestring, "\n")
                 }
-                if (j < ntimes) {
-                    fcat("\n")
-                }
+                if (j < ntimes) fcat("\n")
                 start <- start + charsperline
                 end <- end + charsperline
-                if (end > nchars) {
-                    end <- nchars
-                }
+                if (end > nchars) end <- nchars
             }
         }
     }
 
-    fcat("#NEXUS\n[Data written by write.nexus.data.R,", " ", date(),"]\n")
+    fcat("#NEXUS\n[Data written by write.nexus.data.R, ", date(), "]\n")
 
     NCHAR <- paste("NCHAR=", nchars, sep = "")
-    NTAX <- paste("NTAX=", ntax, sep = "")
-
-    if (format == "dna") {
-        DATATYPE <- "DATATYPE=DNA"
-    }
-    if (format == "protein") {
-        DATATYPE <- "DATATYPE=PROTEIN"
-    }
+    NTAX <- paste0("NTAX=", ntax)
+    DATATYPE <- paste0("DATATYPE", format)
 
     if (is.null(charsperline)) {
-        if (nchars < defcharsperline) {
+        if (nchars <= defcharsperline) {
             charsperline <- nchars
             interleaved <- FALSE
-        }
-        else {
-            if (nchars > defcharsperline) {
-                charsperline <- defcharsperline
-            }
-        }
+        } else charsperline <- defcharsperline
     }
 
-    if (is.null(missing)) {
-        MISSING <- paste("MISSING=", defmissing, sep = "")
-    }
-    else {
-        MISSING <- paste("MISSING=", missing, sep = "")
-    }
+    if (is.null(missing)) missing <- defmissing
+    MISSING <- paste0("MISSING=", missing)
 
-    if (is.null(gap)) {
-        GAP <- paste("GAP=", defgap, sep = "")
-    }
-    else {
-        GAP <- paste("GAP=", gap, sep = "")
-    }
+    if (is.null(gap)) gap <- defgap
+    GAP <- paste0("GAP=", gap)
 
-    if (interleaved == TRUE) {
-        INTERLEAVE <- "INTERLEAVE=YES"
-    }
-    if (interleaved == FALSE) {
-        INTERLEAVE <- "INTERLEAVE=NO"
-    }
+    INTERLEAVE <- if (interleaved) "INTERLEAVE=YES" else "INTERLEAVE=NO"
 
-    if (datablock == TRUE) {
+    if (datablock) {
         fcat("BEGIN DATA;\n")
-        fcat(indent,"DIMENSIONS", " ", NTAX, " ", NCHAR, ";\n")
-        if (format %in% c("dna", "protein")) {
-            fcat(indent, "FORMAT", " ", DATATYPE, " ", MISSING, " ", GAP, " ", INTERLEAVE, ";\n") # from Fran�ois Michonneau (2009-10-02)
-        }
-        fcat(indent,"MATRIX\n")
+        fcat(indent, "DIMENSIONS ", NTAX, " ", NCHAR, ";\n")
+
+        ## <FIXME> only DNA and PROTEIN is supported for the moment, so the
+        ## following 'if' is not needed
+        ## if (format %in% c("DNA", "PROTEIN")) # from Francois Michonneau (2009-10-02)
+        fcat(indent, "FORMAT", " ", DATATYPE, " ", MISSING, " ", GAP, " ", INTERLEAVE, ";\n")
+        ## </FIXME>
+
+        fcat(indent, "MATRIX\n")
         print.matrix(x)
-        fcat(indent, ";\n")
-        fcat("END;\n\n")
-    }
-    else {
+        fcat(indent, ";\nEND;\n\n")
+    } else {
         fcat("BEGIN TAXA;\n")
         fcat(indent, "DIMENSIONS", " ", NTAX, ";\n")
         fcat(indent, "TAXLABELS\n")
         fcat(indent, indent)
         j <- 0
-        for (i in 1:ntax) {
+        for (i in seq_len(ntax)) {
             fcat(names(x[i]), " ")
             j <- j + 1
-            if (i == ntax) {
-                fcat("\n", indent, ";\n")
-            }
-            else {
-                if (j == maxtax) {
-                    fcat("\n", indent, indent)
-                    j <- 0
-                }
+            if (j == maxtax) {
+                fcat("\n", indent, indent)
+                j <- 0
             }
         }
-        fcat("END;\n\n")
-        fcat("BEGIN CHARACTERS;\n")
+        fcat("\n", indent, ";\n")
+        fcat("END;\n\nBEGIN CHARACTERS;\n")
         fcat(indent, "DIMENSIONS", " ", NCHAR, ";\n")
-        if (format %in% c("dna", "protein")) {
-            fcat(indent, "FORMAT", " ", MISSING, " ", GAP, " ", DATATYPE, " ", INTERLEAVE, ";\n")
-        }
+
+        ## <FIXME> only DNA and PROTEIN is supported for the moment, so the
+        ## following 'if' is not needed
+        ## if (format %in% c("DNA", "PROTEIN"))
+        fcat(indent, "FORMAT", " ", MISSING, " ", GAP, " ", DATATYPE, " ", INTERLEAVE, ";\n")
+        ## </FIXME>
+
         fcat(indent,"MATRIX\n")
         print.matrix(x)
-        fcat(indent, ";")
-        fcat("\nEND;\n\n")
+        fcat(indent, ";\nEND;\n\n")
     }
     close(zz)
 }
diff --git a/build/vignette.rds b/build/vignette.rds
index 9aeb3b1..a13ffe5 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/data/hivtree.newick.rda b/data/hivtree.newick.rda
index 36d30f0..c68fd4b 100644
Binary files a/data/hivtree.newick.rda and b/data/hivtree.newick.rda differ
diff --git a/data/landplants.newick.rda b/data/landplants.newick.rda
index ff9b2af..9ef4514 100644
Binary files a/data/landplants.newick.rda and b/data/landplants.newick.rda differ
diff --git a/data/opsin.newick.rda b/data/opsin.newick.rda
index 42c5688..eec50af 100644
Binary files a/data/opsin.newick.rda and b/data/opsin.newick.rda differ
diff --git a/inst/doc/MoranI.pdf b/inst/doc/MoranI.pdf
index 2c7af6a..15a3d25 100644
Binary files a/inst/doc/MoranI.pdf and b/inst/doc/MoranI.pdf differ
diff --git a/man/all.equal.phylo.Rd b/man/all.equal.phylo.Rd
index 4840618..64a8519 100644
--- a/man/all.equal.phylo.Rd
+++ b/man/all.equal.phylo.Rd
@@ -1,4 +1,4 @@
-\encoding{latin1}
+\encoding{utf8}
 \name{all.equal.phylo}
 \alias{all.equal.phylo}
 \title{Global Comparison of two Phylogenies}
@@ -45,7 +45,7 @@
 \value{
   A logical value, or a two-column matrix.
 }
-\author{\enc{Beno�t}{Benoit} Durand \email{b.durand at alfort.AFSSA.FR}}
+\author{\enc{Benoît}{Benoit} Durand \email{b.durand at alfort.AFSSA.FR}}
 \seealso{
   \code{\link[base]{all.equal}} for the generic \R function
 }
diff --git a/man/ape-internal.Rd b/man/ape-internal.Rd
index f73498d..dbcb1c9 100644
--- a/man/ape-internal.Rd
+++ b/man/ape-internal.Rd
@@ -68,6 +68,12 @@
 \alias{CountBipartitionsFromTrees}
 \alias{bitsplits_multiPhylo}
 \alias{bitsplits_phylo}
+\alias{racine}
+\alias{renumeroteArbre}
+\alias{calculeC}
+\alias{getSumSquare}
+\alias{getMLHessian}
+\alias{getREMLHessian}
 \title{Internal Ape Functions}
 \description{
   Internal \pkg{ape} functions.
diff --git a/man/as.alignment.Rd b/man/as.alignment.Rd
index 276d68d..38aea8d 100644
--- a/man/as.alignment.Rd
+++ b/man/as.alignment.Rd
@@ -5,6 +5,10 @@
 \alias{as.DNAbin.list}
 \alias{as.DNAbin.alignment}
 \alias{as.character.DNAbin}
+\alias{as.DNAbin.DNAString}
+\alias{as.DNAbin.DNAStringSet}
+\alias{as.DNAbin.PairwiseAlignmentsSingleSubject}
+\alias{as.DNAbin.DNAMultipleAlignment}
 \title{Conversion Among DNA Sequence Internal Formats}
 \description{
   These functions transform a set of DNA sequences among various
@@ -20,6 +24,14 @@ as.DNAbin(x, ...)
 
 \method{as.DNAbin}{alignment}(x, ...)
 
+\method{as.DNAbin}{DNAString}(x, ...)
+
+\method{as.DNAbin}{DNAStringSet}(x, ...)
+
+\method{as.DNAbin}{PairwiseAlignmentsSingleSubject}(x, ...)
+
+\method{as.DNAbin}{DNAMultipleAlignment}(x, ...)
+
 \method{as.character}{DNAbin}(x, ...)
 }
 \arguments{
@@ -34,7 +46,10 @@ as.DNAbin(x, ...)
   format used in the package \pkg{seqinr} to store aligned sequences.
 
   \code{as.DNAbin} is a generic function with methods so that it works
-  with sequences stored into vectors, matrices, or lists.
+  with sequences stored into vectors, matrices, or lists. It can convert
+  some S4 classes from the package \pkg{Biostrings} in BioConductor. For
+  consistency within \pkg{ape}, this uses an S3-style syntax. To convert
+  objects of class \code{"DNAStringSetList"}, see the examples.
 
   \code{as.character} is a generic function: the present method
   converts objects of class \code{"DNAbin"} into the format used
@@ -59,5 +74,20 @@ x <- as.character(woodmouse)
 x[, 1:20]
 str(as.alignment(x))
 identical(as.DNAbin(x), woodmouse)
+### conversion from BioConductor:
+\dontrun{
+if (require(Biostrings)) {
+data(phiX174Phage)
+X <- as.DNAbin(phiX174Phage)
+## base frequencies:
+base.freq(X) # from ape
+alphabetFrequency(phiX174Phage) # from Biostrings
+### for objects of class "DNAStringSetList"
+X <- lapply(x, as.DNAbin) # a list of lists
+### to put all sequences in a single list:
+X <- unlist(X, recursive = FALSE)
+class(X) <- "DNAbin"
+}
+}
 }
 \keyword{manip}
diff --git a/man/axisPhylo.Rd b/man/axisPhylo.Rd
index 42caaff..c3333e3 100644
--- a/man/axisPhylo.Rd
+++ b/man/axisPhylo.Rd
@@ -2,11 +2,17 @@
 \alias{axisPhylo}
 \title{Axis on Side of Phylogeny}
 \usage{
-axisPhylo(side = 1, ...)
+axisPhylo(side = 1, root.time = NULL, backward = TRUE, ...)
 }
 \arguments{
   \item{side}{a numeric value specifying the side where the axis is
     plotted: 1: below, 2: left, 3: above, 4: right.}
+  \item{root.time}{the time assigned to the root node of the tree. By
+    default, this is taken from the \code{root.time} element of the
+    tree. If it is absent, this is determined from the next option.}
+  \item{backward}{a logical value; if TRUE, the most distant tip from
+    the root is considered as the origin of the time scale; if FALSE,
+    this is the root node.}
   \item{\dots}{further arguments to be passed to \code{axis}.}
 }
 \description{
diff --git a/man/compar.lynch.Rd b/man/compar.lynch.Rd
index 5cbea68..9a74421 100644
--- a/man/compar.lynch.Rd
+++ b/man/compar.lynch.Rd
@@ -48,7 +48,7 @@ compar.lynch(x, G, eps = 1e-4)
   Lynch, M. (1991) Methods for the analysis of comparative data in
   evolutionary biology. \emph{Evolution}, \bold{45}, 1065--1080.
 }
-\author{Julien Claude \email{claude at isem.univ-montp2.fr}}
+\author{Julien Claude \email{Julien.Claude at univ-montp2.fr}}
 \seealso{
   \code{\link{pic}}, \code{\link{compar.gee}}
 }
diff --git a/man/corClasses.Rd b/man/corClasses.Rd
index 179e1aa..e0fd927 100644
--- a/man/corClasses.Rd
+++ b/man/corClasses.Rd
@@ -22,7 +22,8 @@
   \code{\link[nlme]{corClasses}} and \code{\link[nlme]{gls}} in the
   \pkg{nlme} librarie, \code{\link{corBrownian}},
   \code{\link{corMartins}}, \code{\link{corGrafen}},
-  \code{\link{corPagel}}, \code{\link{corBlomberg}}
+  \code{\link{corPagel}}, \code{\link{corBlomberg}},
+  \code{\link{vcv}}, \code{\link{vcv2phylo}}
 }
 \author{Julien Dutheil \email{julien.dutheil at univ-montp2.fr}, Emmanuel
   Paradis}
diff --git a/man/def.Rd b/man/def.Rd
new file mode 100644
index 0000000..e47cd76
--- /dev/null
+++ b/man/def.Rd
@@ -0,0 +1,63 @@
+\name{def}
+\alias{def}
+\title{Definition of Vectors for Plotting or Annotating}
+\description{
+  This function can be used to define vectors to annotate a set of taxon
+  names, labels, etc. It should facilitate the (re)definition of colours
+  or similar attributes for plotting trees or other graphics.
+}
+\usage{
+def(x, ..., default = NULL, regexp = FALSE)
+}
+\arguments{
+  \item{x}{a vector of mode character.}
+  \item{\dots}{a series of statements defining the attributes.}
+  \item{default}{the default to be used (see details).}
+  \item{regexp}{a logical value specifying whether the statements
+    defined in \code{\dots} should be taken as regular expressions.}
+}
+\details{
+The idea of this function is to make the definition of colours, etc.,
+simpler than what is done usually. A typical use will:
+
+\code{def(tr$tip.label, Homo_sapiens = "blue")}
+
+which will return a vector of character strings all "black" except one
+matching the tip label "Homo_sapiens" which will be "blue". Another use
+could be:
+
+\code{def(tr$tip.label, Homo_sapiens = 2)}
+
+which will return a vector a numerical values all 1 except for
+"Homo_sapiens" which will be 2. Several definitions can be done, e.g.:
+
+\code{def(tr$tip.label, Homo_sapiens = "blue", Pan_paniscus = "red")}
+
+The default value is determined with respect to the mode of the values
+given with the \code{\dots} (either "black" or 1).
+
+If \code{regexp = TRUE} is used, then the names of the statements must be
+quoted, e.g.:
+
+\code{def(tr$tip.label, "^Pan_" = "red")}
+
+will return "red" for all labels starting with "Pan_".
+}
+\value{
+a vector of the same length than \code{x}.
+}
+\author{Emmanuel Paradis}
+\examples{
+data(bird.orders)
+a <- def(bird.orders$tip.label, Galliformes = 2)
+str(a) # numeric
+plot(bird.orders, font = a)
+co <- def(bird.orders$tip.label, Passeriformes = "red", Trogoniformes = "blue")
+str(co) # character
+plot(bird.orders, tip.color = co)
+### use of a regexp (so we need to quote it) to colour all orders
+### with names starting with "C" (and change the default):
+co2 <- def(bird.orders$tip.label, "^C" = "gold", default = "grey", regexp = TRUE)
+plot(bird.orders, tip.color = co2)
+}
+\keyword{manip}
diff --git a/man/diversi.gof.Rd b/man/diversi.gof.Rd
index 202082c..5704b58 100644
--- a/man/diversi.gof.Rd
+++ b/man/diversi.gof.Rd
@@ -1,4 +1,4 @@
-\encoding{latin1}
+\encoding{utf8}
 \name{diversi.gof}
 \alias{diversi.gof}
 \title{Tests of Constant Diversification Rates}
@@ -15,7 +15,7 @@ diversi.gof(x, null = "exponential", z = NULL)
 }
 \description{
   This function computes two tests of the distribution of branching
-  times using the \enc{Cram�r}{Cramer}--von Mises and Anderson--Darling
+  times using the \enc{Cramér}{Cramer}--von Mises and Anderson--Darling
   goodness-of-fit tests. By default, it is assumed that the
   diversification rate is constant, and an exponential distribution is
   assumed for the branching times. In this case, the expected
@@ -26,7 +26,7 @@ diversi.gof(x, null = "exponential", z = NULL)
   from a sample of expected branching times.
 }
 \details{
-  The \enc{Cram�r}{Cramer}--von Mises and Anderson--Darling tests
+  The \enc{Cramér}{Cramer}--von Mises and Anderson--Darling tests
   compare the empirical density function (EDF) of the observations to an
   expected cumulative density function. By contrast to the
   Kolmogorov--Smirnov test where the greatest difference between these
diff --git a/man/mst.Rd b/man/mst.Rd
index 936b2b9..62bf3d6 100644
--- a/man/mst.Rd
+++ b/man/mst.Rd
@@ -53,7 +53,7 @@ mst(X)
 }
 \author{
   Yvonnick Noel \email{noel at univ-lille3.fr},
-  Julien Claude \email{claude at isem.univ-montp2.fr} and
+  Julien Claude \email{Julien.Claude at univ-montp2.fr} and
   Emmanuel Paradis
 }
 \seealso{
diff --git a/man/nodepath.Rd b/man/nodepath.Rd
new file mode 100644
index 0000000..b79f7fb
--- /dev/null
+++ b/man/nodepath.Rd
@@ -0,0 +1,31 @@
+\name{nodepath}
+\alias{nodepath}
+\title{Find Paths of Nodes}
+\description{
+  This function finds paths of nodes in a tree. The nodes can be
+  internal and/or terminal (i.e., tips).
+}
+\usage{
+nodepath(phy, from = NULL, to = NULL)
+}
+\arguments{
+  \item{phy}{an object of class \code{"phylo"}.}
+  \item{from, to}{integers giving node or tip numbers.}
+}
+\details{
+  By default, this function returns all the paths from the root to each
+  tip of the tree. If both arguments \code{from} and \code{to} are
+  specified, the shortest path of nodes linking them is returned.
+}
+\value{
+  a list of vectors of integers (by default), or a single vector of
+  integers.
+}
+\author{Emmanuel Paradis}
+\seealso{\code{\link{getMRCA}}}
+\examples{
+tr <- rtree(2)
+nodepath(tr)
+nodepath(tr, 1, 2)
+}
+\keyword{manip}
diff --git a/man/plot.phylo.Rd b/man/plot.phylo.Rd
index eb9d551..2934cf6 100644
--- a/man/plot.phylo.Rd
+++ b/man/plot.phylo.Rd
@@ -175,6 +175,7 @@
   \item{tip.color}{}
   \item{Ntip}{}
   \item{Nnode}{}
+  \item{root.time}{}
 }
 \author{Emmanuel Paradis}
 \seealso{
diff --git a/man/reconstruct.Rd b/man/reconstruct.Rd
new file mode 100644
index 0000000..fd56490
--- /dev/null
+++ b/man/reconstruct.Rd
@@ -0,0 +1,81 @@
+\name{reconstruct}
+\alias{reconstruct}
+\title{Continuous Ancestral Character Estimation}
+\description{
+  This function estimates ancestral character states, and the associated
+  uncertainty, for continuous characters. It mainly works as the
+  \code{\link{ace}} function, from which it differs in the fact that
+  optimisations are not performed by numerical algorithms but through
+  matrix computations.
+}
+\usage{
+reconstruct(x, phyInit, method = "ML", CI = TRUE)
+}
+\arguments{
+  \item{x}{a vector or a factor.}
+  \item{phyInit}{an object of class \code{"phylo"}.}
+  \item{method}{a character specifying the method used for
+    estimation. Three choices are possible: \code{"ML"}, \code{"REML"}
+    or \code{"GLS"}.}
+  \item{CI}{a logical specifying whether to return the 95\% confidence
+    intervals of the ancestral state estimates.}
+}
+\details{
+  The default model is Brownian motion where characters evolve randomly
+  following a random walk. This model can be fitted by maximum
+  likelihood (Felsenstein 1973, Schluter et al. 1997 - the default),
+  residual maximum likelihood, or generalized least squares
+  (\code{method = "GLS"}, Martins and Hansen 1997, Cunningham et
+  al. 1998).
+}
+\value{
+  a list with the following elements:
+
+  \item{ace}{the estimates of the ancestral character values.}
+  \item{CI95}{the estimated 95\% confidence intervals.}
+  \item{sigma2}{if \code{method = "ML"}, the maximum likelihood estimate
+    of the Brownian parameter.}
+  \item{loglik}{if \code{method = "ML"}, the maximum log-likelihood.}
+}
+\references{
+  Cunningham, C. W., Omland, K. E. and Oakley, T. H. (1998)
+  Reconstructing ancestral character states: a critical
+  reappraisal. \emph{Trends in Ecology & Evolution}, \bold{13},
+  361--366.
+
+  Felsenstein, J. (1973) Maximum likelihood estimation of evolutionary
+  trees from continuous characters. \emph{American Journal of Human
+  Genetics}, \bold{25}, 471--492.
+
+  Martins, E. P. and Hansen, T. F. (1997) Phylogenies and the
+  comparative method: a general approach to incorporating phylogenetic
+  information into the analysis of interspecific data. \emph{American
+  Naturalist}, \bold{149}, 646--667.
+
+  Schluter, D., Price, T., Mooers, A. O. and Ludwig, D. (1997)
+  Likelihood of ancestor states in adaptive radiation. \emph{Evolution},
+  \bold{51}, 1699--1711.
+
+  Yang, Z. (2006) \emph{Computational Molecular Evolution}. Oxford:
+  Oxford University Press.
+
+  Royer-Carenzi, M. and Didier, G. (2014) Comparison of ancestral state
+  reconstruction methods for continuous characters under directional
+  evolution. Submitted.
+}
+\author{Manuela Royer-Carenzi, Gilles Didier}
+\seealso{
+  \code{\link{MPR}}, \code{\link{corBrownian}}, \code{\link{compar.ou}}
+
+  Reconstruction of ancestral sequences can be done with the package
+  \pkg{phangorn} (see function \code{?ancestral.pml}).
+}
+\examples{
+### Some random data...
+data(bird.orders)
+x <- rnorm(23)
+### Compare the three methods for continuous characters:
+reconstruct(x, bird.orders)
+reconstruct(x, bird.orders, method = "REML")
+}
+\keyword{models}
diff --git a/man/vcv.phylo.Rd b/man/vcv.phylo.Rd
index f48e574..1531a89 100644
--- a/man/vcv.phylo.Rd
+++ b/man/vcv.phylo.Rd
@@ -43,7 +43,7 @@ vcv(phy, ...)
 \seealso{
   \code{\link{corBrownian}}, \code{\link{corMartins}},
   \code{\link{corGrafen}}, \code{\link{corPagel}},
-  \code{\link{corBlomberg}}
+  \code{\link{corBlomberg}}, \code{\link{vcv2phylo}}
 }
 \examples{
 tr <- rtree(5)
diff --git a/man/vcv2phylo.Rd b/man/vcv2phylo.Rd
new file mode 100644
index 0000000..b5af61a
--- /dev/null
+++ b/man/vcv2phylo.Rd
@@ -0,0 +1,35 @@
+\name{vcv2phylo}
+\alias{vcv2phylo}
+\title{Variance-Covariance Matrix to Tree}
+\description{
+  This function transforms a variance-covariance matrix into a
+  phylogenetic tree.
+}
+\usage{
+vcv2phylo(mat, tolerance = 1e-7)
+}
+\arguments{
+  \item{mat}{a square symmetric (positive-definite) matrix.}
+  \item{tolerance}{the numeric tolerance used to compare the branch
+    lengths.}
+}
+\details{
+  The function tests if the matrix is symmetric and positive-definite
+  (i.e., all its eigenvalues positive within the specified tolerance).
+}
+\value{
+  an object of class \code{"phylo"}.
+}
+\author{Simon Blomberg}
+\seealso{
+  \code{\link{vcv}}, \code{\link{corPhyl}}
+}
+\examples{
+tr <- rtree(10)
+V <- vcv(tr) # VCV matrix assuming Brownian motion
+z <- vcv2phylo(V)
+identical(tr, z) # FALSE
+all.equal(tr, z) # TRUE
+}
+\keyword{manip}
+\keyword{multivariate}
diff --git a/man/write.nexus.data.Rd b/man/write.nexus.data.Rd
index 186866b..d434b7e 100644
--- a/man/write.nexus.data.Rd
+++ b/man/write.nexus.data.Rd
@@ -5,7 +5,7 @@
 }
 \description{
   This function writes in a file a list of sequences in the NEXUS
-  format.The names of the vectors of the list are used as taxon names.
+  format. The names of the vectors of the list are used as taxon names.
 }
 \usage{
 write.nexus.data(x, file, format = "dna", datablock = TRUE,
@@ -13,15 +13,16 @@ write.nexus.data(x, file, format = "dna", datablock = TRUE,
                  gap = NULL, missing = NULL)
 }
 \arguments{
-  \item{x}{a list of sequences each made of a single vector of mode
-    character where each element is a character state (e.g. \dQuote{A},
-    \dQuote{C}, ...).}
+  \item{x}{a matrix or a list of sequences each made of a single vector
+    of mode character where each element is a character state (e.g.,
+    \dQuote{A}, \dQuote{C}, \dots) Objects of class of \dQuote{DNAbin}
+    are accepted.}
   \item{file}{a file name specified by either a variable of mode
     character, or a double-quoted string.}
   \item{format}{a character string specifying the format of the
-    sequences. Two choices are possible: \code{dna}, or \code{protein},
-    or any unambiguous abbreviation of these. Default is
-    \dQuote{\code{dna}}.}
+    sequences. Two choices are possible: \dQuote{dna} (the default) or
+    \dQuote{protein}, or any unambiguous abbreviation of these (case
+    insensitive).}
   \item{datablock}{a logical, if \code{TRUE} the data are written in a
     single DATA block. If \code{FALSE} data is written in TAXA and
     CHARACTER blocks. Default is \code{TRUE}.}
@@ -30,8 +31,7 @@ write.nexus.data(x, file, format = "dna", datablock = TRUE,
     with \code{charsperline = numerical_value}. If \code{FALSE}, data is
     written in sequential format. Default is \code{TRUE}.}
   \item{charsperline}{a numeric specifying the number of characters per
-    line when used with \code{interleaved = TRUE}. Default is
-    \code{80}.}
+    line when used with \code{interleaved = TRUE}. Default is 80.}
   \item{gap}{a character specifying the symbol for gap. Default is
     \dQuote{\code{-}}.}
   \item{missing}{a character specifying the symbol for missing
@@ -41,13 +41,10 @@ write.nexus.data(x, file, format = "dna", datablock = TRUE,
   If the sequences have no names, then they are given \dQuote{1},
   \dQuote{2}, ..., as names in the file.
 
-  Sequences must be all of the same length (i.e., aligned).
+  Sequences must be all of the same length.
 
   Default symbols for missing data and gaps can be changed by using the
   \code{missing} and \code{gap} commands.
-
-  Please see files \file{data.nex} and \file{taxacharacters.nex} for
-  examples of output formats.
 }
 \value{
   None (invisible \sQuote{NULL}).
@@ -57,8 +54,6 @@ write.nexus.data(x, file, format = "dna", datablock = TRUE,
   extensible file format for systematic information. \emph{Systematic
     Biology}, \bold{46}, 590--621.
 }
-\note{...}
-
 \author{Johan Nylander \email{nylander at scs.fsu.edu}}
 \seealso{
   \code{\link{read.nexus}},\code{\link{write.nexus}},
@@ -67,10 +62,10 @@ write.nexus.data(x, file, format = "dna", datablock = TRUE,
 \examples{
 \dontrun{
 ## Write interleaved DNA data with 100 characters per line in a DATA block
-data("woodmouse")
+data(woodmouse)
 write.nexus.data(woodmouse, file= "wood.ex.nex", interleaved = TRUE, charsperline = 100)
 ## Write sequential DNA data in TAXA and CHARACTERS blocks
-data("cynipids")
+data(cynipids)
 write.nexus.data(cynipids, file = "cyn.ex.nex", format = "protein",
                  datablock = FALSE, interleaved = FALSE)
 unlink(c("wood.ex.nex", "cyn.ex.nex"))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-cran-ape.git



More information about the debian-med-commit mailing list