我正在尝试分析与血细胞比容(一种生理特征)的遗传力有关的系统发育信号,但我在该过程的最后一步遇到了问题。基本上,我已经将系统发育树(amphtree)与对象(p4d)融合data (amphdata)
在一起phylo4d
。但是,当我尝试运行该函数时,phyloSignal()
我收到一条错误消息:
f(arg, ...) 中的错误:与请求的类型不兼容:[type=character; 目标=双]。
这是代码:
p4d <- phylo4d(amphtree, amphdata)
phyloSignal(p4d, methods = "Lambda", reps=999)
供参考的对象如下所示:
label node ancestor edge.length node.type Species Hct
1 Cryptobranchus_alleganiensis 1 30 162.714627 tip Batrachuperus yenyuanensis 0.3049255
2 Batrachuperus_yenyuanensis 2 30 162.714598 tip Bombina bombina 0.1937037
3 Pseudotriton_ruber 3 33 13.056026 tip Bufo bufo 0.3494179
4 Pseudotriton_montanus 4 33 13.056026 tip Bufotes viridis 0.4765116
5 Gyrinophilus_porphyriticus 5 32 19.306586 tip Cryptobranchus alleganiensis 0.3705314
6 Plethodon_jordani 6 35 14.461405 tip Desmognathus monticola 0.2250000
7 Plethodon_glutinosus 7 35 14.461407 tip Desmognathus ochrophaeus 0.2340000
8 Desmognathus_quadramaculatus 8 36 24.506631 tip Desmognathus quadramaculatus 0.2360000
9 Desmognathus_ochrophaeus 9 37 19.114006 tip Duttaphrynus melanostictus 0.3972312
10 Desmognathus_monticola 10 37 19.114010 tip Gyrinophilus porphyriticus 0.2330000
11 Pelophylax_ridibundus 11 43 61.867042 tip Hoplobatrachus rugulosus 0.2798000
12 Rana_catesbeiana 12 45 30.844303 tip Hyla arborea 0.4907000
13 Rana_vaillanti 13 45 30.844306 tip Leptodactylus latrans 0.2060000
14 Rana_dalmatina 14 46 14.323574 tip Lithobates catesbeianus 0.3109000
15 Rana_macrocnemis 15 46 14.323572 tip Lithobates vaillanti 0.2200000
16 Hoplobatrachus_rugulosus 16 42 102.767888 tip Osteopilus septentrionalis 0.2240000
17 Leptodactylus_latrans 17 48 86.590591 tip Pelobates syriacus 0.3942857
18 Bufotes_viridis 18 51 30.803038 tip Pelophylax ridibundus 0.3151769
19 Duttaphrynus_melanostictus 19 51 30.803039 tip Plethodon glutinosus 0.2310000
20 Bufo_bufo 20 50 34.253520 tip Plethodon jordani 0.2280250
21 Rhinella_fernandezae 21 52 29.319878 tip Pseudotriton montanus 0.2460000
22 Rhinella_spinulosa 22 52 29.319879 tip Pseudotriton ruber 0.2570000
23 Hyla_arborea 23 53 68.615794 tip Rana dalmatina 0.3305000
24 Osteopilus_septentrionalis 24 53 68.615795 tip Rana macrocnemis 0.3275000
25 Pelobates_syriacus 25 40 188.800107 tip Rhinella fernandezae 0.2737000
26 Xenopus_laevis 26 39 201.679566 tip Rhinella spinulosa 0.3418471
27 Bombina_bombina 27 38 202.723791 tip Xenopus laevis 0.4120000
28 <NA> 28 0 NA root <NA> NA
29 <NA> 29 28 87.722816 internal <NA> NA
30 <NA> 30 29 21.137799 internal <NA> NA
31 <NA> 31 29 100.319499 internal <NA> NA
32 <NA> 32 31 64.226325 internal <NA> NA
33 <NA> 33 32 6.250558 internal <NA> NA
34 <NA> 34 31 23.589476 internal <NA> NA
35 <NA> 35 34 45.481997 internal <NA> NA
36 <NA> 36 34 35.436775 internal <NA> NA
37 <NA> 37 36 5.392622 internal <NA> NA
38 <NA> 38 28 68.851399 internal <NA> NA
39 <NA> 39 38 1.044239 internal <NA> NA
40 <NA> 40 39 12.879443 internal <NA> NA
41 <NA> 41 40 36.193105 internal <NA> NA
42 <NA> 42 41 49.839130 internal <NA> NA
43 <NA> 43 42 40.900854 internal <NA> NA
44 <NA> 44 43 27.652261 internal <NA> NA
45 <NA> 45 44 3.370466 internal <NA> NA
46 <NA> 46 44 19.891196 internal <NA> NA
47 <NA> 47 41 59.271780 internal <NA> NA
48 <NA> 48 47 6.744614 internal <NA> NA
49 <NA> 49 48 47.656139 internal <NA> NA
50 <NA> 50 49 4.680933 internal <NA> NA
51 <NA> 51 50 3.450483 internal <NA> NA
52 <NA> 52 49 9.614573 internal <NA> NA
53 <NA> 53 47 24.719414 internal <NA> NA
任何建议表示赞赏!另外,如果有人知道更好的方法,请随时告诉我