o Several bugs were fixed in mlphylo().
o collapsed.singles() did not propagate the 'Nnode' and
- 'node.labels' elements (thanks to Elizabeth Purdom for the fix.
+ 'node.labels' elements (thanks to Elizabeth Purdom for the fix).
+
+ o read.nexus failed to remove correctly the comments within trees.
OTHER CHANGES
Package: ape
Version: 2.2-1
-Date: 2008-06-19
+Date: 2008-06-24
Title: Analyses of Phylogenetics and Evolution
Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong,
Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel,
-## read.nexus.R (2008-02-28)
+## read.nexus.R (2008-06-24)
## Read Tree File in Nexus Format
w <- LEFT == RIGHT
if (any(w)) { # in case all comments use at least 2 lines
s <- LEFT[w]
- X[s] <- gsub("\\[.*\\]", "", X[s])
+ X[s] <- gsub("\\[[^]]*\\]", "", X[s])
+ ## The previous regexp was quite tough to find: it makes
+ ## possible to delete series of comments on the same line:
+ ## ...[...]xxx[...]...
+ ## without deleting the "xxx". This regexp is in three parts:
+ ## \\[ [^]]* \\]
+ ## where [^]]* means "any character, except "]", repeated zero
+ ## or more times" (note that the ']' is not escaped here).
+ ## The previous version was:
+ ## X[s] <- gsub("\\[.*\\]", "", X[s])
+ ## which deleted the "xxx". (EP 2008-06-24)
}
w <- !w
if (any(w)) {