Good day!

We have been trying to run some control analyses to make sure the species
names in our datafile match with the names in our tree file.
I received the code to control matching names from someone and it has always
worked perfectly for me.
However, now that I'm working on this new blackbird dataset, I cannot figure
out why it keeps giving me the following error message:

Warning message: In rownames(dat) == rownames(tree) :  longer object length
is not a multiple of shorter object length

Plus it gives us "OK" (i.e. matching names in datafile & tree) for only 3
species, whereas in the files they ARE in the same order etc. We've tried
everything: shortening the names, removing underscores, etc, but cannot
figure out why the names in our tree & datafile won't match.

If anyone could provide us with a solution as to how to solve this problem
by looking at the attached datafiles, we would be most grateful!

With many thanks in advance!

Neeltje Boogert, PhD student Prof. Louis Lefebvre, Biology Department McGill
University, Montreal, Canada
(neglecta:0.141745,oryzivorus:0.160699,(((((((cyanopus:0.005783,xanthophthalmus:0.001341):0.056113,thilius:0.053832):0.01114,(icterocephalus:0.022695,ruficapillus:0.024103):0.043872,(guirahuro:0.014756,virescens:0.023606):0.032861,chopi:0.070763,(badius:0.042213,bolivianus:0.051009):0.013794):0.005785,(holosericeus:0.071449,curaeus:0.062265):0.019201):0.006979,(gmexicanus:0.07015,pyrohypogaster:0.057790999999999995,tanagrinus:0.060683):0.005655):0.014111,nigerrimus:0.069005):0.009639,((humeralis:0.010024,xanthomus:0.009013):0.067806,(phoeniceus:0.072478,tricolor:0.040569):0.015383):0.023266,(((aeneus:0.013539,(ater:0.014024,bonariensis:0.015999):0.007344):0.016327,oryzivora:0.032242):0.011615,rufoaxillaris:0.042065):0.039304,((carolinus:0.044519,cyanocephalus:0.042603):0.019115,((lugubris:0.015273,(major:0.016139,mexicanus:0.020211,qniger:0.018485):0.013458):0.01131,quiscula:0.02753):0.023767):0.01935):0.063684);
> nms <- rownames(tree)
> snms <- sort(nms, index.return = TRUE)
> tree <- tree[snms$ix, snms$ix]

> p <- rownames(dat)
> sp <- sort(p, index.return = TRUE)
> dat <- dat[p$ix,]

> ifelse(rownames(dat)==rownames(tree), "OK", rownames(dat))

[1] "OK"            "OK"            "OK"            "bonariensis"  

[5] "carolinus"     "chopi"         "curaeus"       "cyanocephalus"

[9] "guirahuro"     "holosericeus"  "lugubris"      "major"        

[13] "mexicanus"     "neeltje"       "oryzivora"     "phoeniceus"   

[17] "quiscula"      "ruficapillus"  "rufoaxillaris" "tanagrinus"   

[21] "thilius"       "virescens"     "aeneus"        "ater"         

[25] "badius"        "bonariensis"   "carolinus"     "chopi"        

[29] "curaeus"       "cyanocephalus" "guirahuro"     "holosericeus" 

[33] "lugubris"      "major"        

Warning message:

In rownames(dat) == rownames(tree) :

  longer object length is not a multiple of shorter object length
        measurea        measureb        measurec        measured
neglecta        -1.1    -1.8    NA      NA
oryzivorus      -1.95   -1.49   NA      NA
cyanopus        NA      NA      1.53    15182
xanthophthalmus NA      NA      2.96    63
thilius         0.62    0.16    3.91    15541
icterocephalus  0.06    NA      3.2     13978
ruficapillus    -0.03   0.08    3.05    33084
guirahuro       0.47    0.46    2.39    5458
virescens       0.12    0.68    1.02    3207
chopi           -0.81   -1.53   2.24    20329
badius          0.60    0.81    2.92    29142
bolivianus      NA      NA      0.4     433
holosericeus    1.41    1.23    1.59    5189
curaeus         1.46    1.12    4.79    4601
gmexicanus      0.28    NA      5.13    10478
pyrohypogaster  NA      NA      1.28    91
tanagrinus      0.4     0.52    2.23    5644
nigerrimus      0.54    0.05    NA      NA
humeralis       NA      0.14    0.38    700
xanthomus       0.22    NA      0.66    86
phoeniceus      0.06    -0.81   5.1     79236
tricolor        1.83    NA      1.95    3345
aeneus          -0.34   -1.06   3.64    40286
ater            -1.92   -0.22   3.73    62838
bonariensis     -0.39   0.08    5.6     58811
oryzivora       0.03    -1.14   3.94    36599
rufoaxillaris   -0.95   -1.52   2       6472
carolinus       -0.33   -0.73   1.74    44779
cyanocephalus   -0.98   -1.13   2.3     39918
lugubris        1.57    1.48    1.75    13930
major           1.39    1.35    1.04    6974
mexicanus       -0.07   1.14    4.36    56671
qniger          0.11    0.87    0.78    3798
quiscula        1.40    0.38    2.64    45201
_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to