Hi, It's not clear from your code how are you using `fixdata` in your analysis. Is `SWSPeak` a vector you are extracting from the `fixdata` table? Could it be that you still have the old (w/o species removed) `SWSPeak` in memory from a previous session?
Best, E. On 5 January 2016 at 07:50, Michael Pauers <mjpau...@gmail.com> wrote: > Dear List, > > I am having some difficulties calculating phylogenetic independent > contrasts on a multiPhylo object using APE. When I attempt to calculate a > contrast, the following error message appears (preceded by the code I am > using to calculate the PIC): > >> fixtree <- read.nexus("fixeddatatrees.nex") >> fixdata <- read.table("newfix.txt") >> PIC.SWSPeak <- mapply(pic, list(SWSPeak), fixtree) > Error in (function (x, phy, scaled = TRUE, var.contrasts = FALSE, > rescaled.tree = FALSE) : > length of phenotypic and of phylogenetic data do not match > > I know that both the phylogenies ("fixeddatatrees.nex") and the phenotypic > dataset ("newfix.txt") contain the same number of taxa (21). However, when > I ask APE for the length of the data, it tells me the following: > >> length(SWSPeak) > [1] 39 > > This is somewhat meaningful, as this particular analysis is restricted to a > subset of my original group, which contained 39 species. From my original > phyloeny, then, I pruned the unnecessary 18 species, and also deleted them > from the phenotypic dataset. Could it be the case that there is some sort > of artefact in either of these files that is left over from their "parent" > files? I should note that my analyses, also PICs, on the original tree and > data went perfectly and without any error message. > > Thanks in advance for whatever help you can offer. > > Best, > > Mike Pauers > > [[alternative HTML version deleted]] > > _______________________________________________ > R-sig-phylo mailing list - R-sig-phylo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/ _______________________________________________ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/