Hi Having another problem with the same function now. What you suggested worked for one tree, but for the attached tree and file it didn't...
I get: > ttree<-date.phylo(tree, ages, rlen=10, method="equal") Error: subscript out of bounds > traceback() 1: date.phylo(tree, ages, rlen = 10, method = "equal") On Thu, Jul 21, 2011 at 5:12 PM, Klaus Schliep <klaus.schl...@gmail.com> wrote: > Hi Roland! > ages should be a matrix, with row names and the ages in the first column. > > On 7/21/11, Roland Sookias <r.sook...@gmail.com> wrote: >> Great! It worked. What format should the file be in then? I thought I'd >> followed the format specified.. Thanks very much indeed :) >> >> On Thu, Jul 21, 2011 at 4:10 PM, Klaus Schliep >> <klaus.schl...@gmail.com>wrote: >> >>> Hi Roland, >>> >>> as I suspected, your ages list was not in the right format (has >>> nothing to do with ape). >>> Try this: >>> >>> tmp = read.csv("agescut.csv", header=FALSE) >>> ages = matrix(tmp[, 2], ncol=1) >>> rownames(ages) = tmp[,1] >>> tree = read.tree("archotreeresolved6.tre") >>> ttree<-date.phylo(tree, ages, rlen=1, method="equal") >>> >>> >>> Regards, >>> Klaus >>> >>> >>> >>> On 7/21/11, Roland Sookias <r.sook...@gmail.com> wrote: >>> > Hi >>> > >>> > Thanks guys. >>> > >>> > Attached are the two files (will these work via the list?) >>> > >>> > When I type trackback() all I get is 1: date.phylo(archotreeresolved, >>> ages, >>> > rlen = 1, method = "equal"). >>> > >>> > Roland >>> > >>> > >>> > >>> > On Thu, Jul 21, 2011 at 1:24 PM, Klaus Schliep >>> > <klaus.schl...@gmail.com>wrote: >>> > >>> >> Dear Roland, >>> >> >>> >> it would be good if you add the datasets, that one can reproduce your >>> >> results (archotreeresolved, ages). I would guess from the error >>> >> message that your ages list may has the wrong format. >>> >> Also traceback() sometimes tells you where the error happens exactly. >>> >> >>> >> Kind regards >>> >> Klaus >>> >> >>> >> On 7/21/11, Roland Sookias <r.sook...@gmail.com> wrote: >>> >> > Hi all >>> >> > >>> >> > I'm trying to assign lengths to branches in a tree using the Ruta et >>> al. >>> >> > 2008 method via Graeme Lloyd's date.phylo() function (see >>> >> > http://www.graemetlloyd.com/methdpf.html). I keep coming up against >>> an >>> >> error >>> >> > for some reason. Graeme himself does exactly the same thing seemingly >>> on >>> >> his >>> >> > Mac (I'm using Windows 7, R 2.13.1, Ape 2.7-2 - Graeme has Ape 2.7-1) >>> >> > and >>> >> it >>> >> > works. I've tried various permutations of the tree, with and without >>> >> > a >>> >> > rooted symbol [&r], and there are no special characters etc., the >>> names >>> >> in >>> >> > tree and ages list are the same. I still keep getting: >>> >> > >>> >> > ttree<-date.phylo(archotreeresolved, ages, rlen=1, method="equal") >>> >> > Error in ages[tree$tip.label[find.descendants(nodes[i], tree)], 1] : >>> >> > incorrect number of dimensions >>> >> > >>> >> > Any help, or advice what to try/look into much appreciated. Graeme >>> >> > thinks >>> >> > it's something with ape not date.phylo... >>> >> > >>> >> > Very best >>> >> > >>> >> > Roland >>> >> > >>> >> > [[alternative HTML version deleted]] >>> >> > >>> >> > _______________________________________________ >>> >> > R-sig-phylo mailing list >>> >> > R-sig-phylo@r-project.org >>> >> > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo >>> >> > >>> >> >>> >> >>> >> -- >>> >> Klaus Schliep >>> >> Université Paris 6 (Pierre et Marie Curie) >>> >> 9, Quai Saint-Bernard, 75005 Paris >>> >> >>> > >>> >>> >>> -- >>> Klaus Schliep >>> Université Paris 6 (Pierre et Marie Curie) >>> 9, Quai Saint-Bernard, 75005 Paris >>> >> > > > -- > Klaus Schliep > Université Paris 6 (Pierre et Marie Curie) > 9, Quai Saint-Bernard, 75005 Paris >
?Dicynodon?_trautscholdi,254 Aelurosaurus_felinus,260 Aelurosaurus_wilmanae,254 Aloposaurus_gracilis,260 Aloposaurus_tenuis,260 Aloposaurus_watermeyeri,254 Aloposaurus_sp._-GPIT/RE/7123,260 Arctognathus_breviceps,260 Arctognathus_curvimola,260 Arctognathus_cf._curvimola,260 Aulacephalodon_baini,260 Australobarbarus_kotelnitschi,260 Australobarbarus_platycephalus,260 Bauria_cynops,250 Brasilodon_quadrangularis,228 Chiniquodon_sanjuanensis,235 Chiniquodon_theotonicus,241 Cistecephaloides_boonstrai,260 Cistecephalus_microrhinus,260 Clelandina_laticeps,260 Clelandina_rubidgei,260 Clelandina_scheepersi,260 Cynognathus_crateronotus,250 Cynognathus_sp.,250 Cyonosaurus_longiceps,260 Cyonosaurus_rubidgei,254 Delectosaurus_arefjevi,254 Delectosaurus_berezhanensis,254 Diademodon_grossarthi,250 Diademodon_mastacus,250 Diademodon_rhodesiensis,245 Diademodon_tetragonus,250 Diademodon_sp.,250 Diictodon_feliceps,266 Ecteninion_lunensis,235 Elph_borealis,260 Emydops_arctatus,266 Emydops_oweni,260 Emydops_platyceps,260 Endothiodon_bathystoma,260 Endothiodon_mahalanobisi,260 Endothiodon_paucidens,260 Endothiodon_uniseries,266 Endothiodon_whaitsi,260 Eozostrodon_parvus,201.6 Ericiolacerta_parva,251 Erythrotherium_parringtoni,201.6 Euchambersia_mirabilis,260 Exaeretodon_argentinus,235 Exaeretodon_riograndensis,235 Exaeretodon_statisticae,235 Galesaurus_planiceps,251 Geikia_elginensis,254 Geikia_locusticeps,254 Gorgonops_capensis,260 Gorgonops_dixeyi,260 Gorgonops_torvus,260 Gorgonops?_kaiseri,260 Ictidosuchoides_longiceps,254 Ictidosuchops_intermedius,260 Ictidosuchus_primaevus,260 Inostrancevia_alexandri,260 Interpresosaurus_blomi,254 Kannemeyeria_argentinensis,245 Kannemeyeria_erithrea,245 Kannemeyeria_lophorhinus,245 Kannemeyeria_simocephalus,245 Katumbia_parringtoni,254 Kawingasaurus_fossilis,254 Kayentatherium_wellesi,201.6 Kingoria_duvenhagei,254 Kingoria_grahami,254 Kingoria_howardi,260 Kingoria_nowacki,260 Kingoria_recurvidens,260 Kingoria_sp._-Kundaram_Fm.,260 Kombuisia_antarctica,251 Kombuisia_frerensis,245 Langbergia_modisei,250 Luangwa_drysdali,245 Luangwa_sudamericana,245 Luangwa_sp.,245 Lumkuia_fuzzi,250 Lycaenops_angusticeps,260 Lycaenops_attenuatus,254 Lycaenops_ornatus,260 Lycaenops_quadrata,260 Lycaenops_sollasi,260 Lystrosaurus_curvatus,254 Lystrosaurus_georgi,251 Lystrosaurus_hedini,254 Lystrosaurus_maccaigi,254 Lystrosaurus_murrayi,251 Lystrosaurus_robustus,251 Massetognathus_pascuali,241 Megazostrodon_sp.,201.6 Mirotenthes_digitipes,260 Moschowhaitsia_vjuschkovi,254 Myosaurus_gracilis,251 Njalila_insigna,260 Njalila_nasuta,260 Odontocyclops_whaitsi,254 Oligokyphus_major,201.6 Olivierosuchus_parringtoni,250 Oudenodon_bainii,260 Oudenodon_sp._-Kundaram_Fm.,260 Pachygenelus_monus,201.6 Pascualgnathus_polanskii,245 Pelanomodon_rubidgei,254 PIN4774/1_morganucodontid,168 Platycraniellus_elegans,251 Probainognathus_jenseni,245 Procynosuchus_delaharpeae,254 Promoschorhynchus_platyrhinus,251 Regisaurus_jacobi,251 Rhachiocephalus_behemoth,254 Rhachiocephalus_magnus,260 Riograndia_guaibensis,228 Rubidgea_atrox,260 Rubidgea_pricei,260 Rubidgea_quinquemolaris,260 Sauroctonus_parringtoni,260 Scalenodon_sp.,245 Scylacognathus_kitchingi,254 Scylacognathus_parvus,260 Scylacognathus_robustus,260 Sinoconodon_sp.,204 Sinognathus_gracilis,245 Suminia_getmanovi,260 Sycosaurus_kingoriensis,260 Sycosaurus_laticeps,260 Sycosaurus_terror,260 Sycosaurus?_intactus,254 Tetracynodon_darti,250 Theriognathus_microps,254 Thrinaxodon_liorhinus,251 Trirachodon_berryi,245 Tropidostoma_microtrema,260
therapsidtree.tre
Description: Binary data
_______________________________________________ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo