Re: [R-sig-phylo] Dating trees using date.phylo - ape problem?
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.comwrote: 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.comwrote: 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
Re: [R-sig-phylo] Dating trees using date.phylo - ape problem?
Hi Roland, Just after the error, type: traceback() This will show you, hopefully, where the error happened. Best, Emmanuel -Original Message- From: Roland Sookias r.sook...@gmail.com Sender: r-sig-phylo-boun...@r-project.org Date: Thu, 21 Jul 2011 12:44:30 To: r-sig-phylo@r-project.orgr-sig-phylo@r-project.org Subject: [R-sig-phylo] Dating trees using date.phylo - ape problem? 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 ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Re: [R-sig-phylo] Dating trees using date.phylo - ape problem?
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 ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Re: [R-sig-phylo] Dating trees using date.phylo - ape problem?
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.comwrote: 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 archotreeresolved6.tre Description: Binary data Abrictosaurus_consors,195.8 Aetosauroides_scagliai,225.5 Aetosaurus_ferratus,210 Afrovenator_abakensis,160.75 Agilisaurus_louderbacki,170 Anchisaurus_polyzelus,188.8 Antetonitrus_ingenipes,208.8 Archeopelta_arborensis,234.5 Archosaurus_rossicus,265.5 Asilisaurus_kongwe,243 Atlasaurus_imelakei,164.5 Austriadactylus_cristatus,210 Barapasaurus_tagorei,188.8 Batrachotomus_kupferzellensis,238 Bellusaurus_sui,164.5 Berberosaurus_liassicus,183 Callovosaurus_leedsi,163 Camelotia_borealis,202.8 Campylognathoides_liasicus,179.5 Campylognathoides_zitteli,179.5 Cetiosaurus_oxoniensis,168.5 Chanaresuchus_bonapartei,234.5 Chindesaurus_bryansmalli,218.3 Chuandongocoelurus_primitivus,170 Coahomasuchus_kahleorum,216 Coelophysis_bauri,208.8 Coelophysis_kayentakatae,190 Coelophysis_rhodesiensis,195.8 Condorraptor_currumili,163 Cryolophosaurus_ellioti,188.8 Darwinopterus_modularis,159.5 Desmatosuchus_smalli,210 Dilophosaurus_wetherilli,190 Dimorphodon_macronyx,195.8 Dolabrosaurus_aquatilis,208.8 Dorygnathus_banthensis,179.5 Doswellia_kaltenbachi,231.5 Drepanosaurus_unguicaudatus,210 Dromomeron_gregorii,216 Dromomeron_romeri,208.8 Duriavenator_hesperis,170 Effigia_okeeffeae,208.8 Efraasia_minor,210 Eocursor_parvus,208.8 Eoraptor_lunensis,231.5 Epidendrosaurus_ningchengensis,159.5 Epidexipteryx_hui,159.5 Erythrosuchus_africanus,243 Eucoelophysis_baldwini,208.8 Eudimorphodon_cromptonellus,210 Eudimorphodon_ranzii,210 Euparkeria_capensis,243 Eustreptospondylus_oxoniensis,163 Fasolasuchus_tenax,208.8 Gongxianosaurus_shibeiensis,188.8 Herrerasaurus_ischigualastensis,231.5 Hesperosuchus_agilis,216 Heterodontosaurus_tucki,195.8 Hexinlusaurus_multidens,170 Howesia_browni,243 Huayangosaurus_taibaii,170 Hyperodapedon_gordoni,225.5 Hypuronector_limnaios,222 Isanosaurus_attavipachi,208.8 Jeholopterus_ningchengensis,159.5 Jingshanosaurus_xinwaensis,195.8 Kayentasuchus_walkeri,190 Lagerpeton_chanarensis,234.5 Langobardisaurus_pandolfi,210 Langobardisaurus_tonelloi,210 Leptosuchus_adamanensis,216 Leptosuchus_crosbiensis,222 Lesothosaurus_diagnosticus,195.8 Lewisuchus_admixtus,234.5 Liliensternus_liliensterni,210 Loricatosaurus_priscus,163 Lufengosaurus_huenei,195.8 Lycorhinus_angustidens,195.8 Macrocnemus_bassanii,240 Magnosaurus_nethercombensis,170 Marasuchus_lilloensis,234.5 Massospondylus_carinatus,195.8 Megalancosaurus_endennae,216 Megalancosaurus_preonensis,216 Megalosaurus_bucklandii,166.5 Melanorosaurus_readi,214.8 Melanorosaurus_thabanensis,195.8 Mesosuchus_browni,243 Monolophosaurus_jiangi,166.5 Mystriosuchus_planirostris,210 Omeisaurus_tianfuensis,170 Ornithosuchus_longidens,225.5 Orthosuchus_stormbergi,195.8 Panphagia_protos,231.5 Patagosaurus_fariasi,163 Peteinosaurus_zambelli,210 Piatnitzkysaurus_floresi,163 Pisanosarus_mertii,231.5 Plateosauravus_cullingworthi,208.8 Plateosaurus_engelhardti,208.8 Poposaurus_gracilis,219.5 Postosuchus_kirkpatricki,214.8 Preondactylus_buffarinii,210 Prestosuchus_chiniquensis,234.5 Prolacerta_broomi,248 Protorosaurus_speneri,265.5 Protosuchus_haughtoni,195.8 Protosuchus_richardsoni,199.3 Pseudopalatus_buceros,208.8
Re: [R-sig-phylo] Dating trees using date.phylo - ape problem?
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.comwrote: 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 ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Re: [R-sig-phylo] Dating trees using date.phylo - ape problem?
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.comwrote: 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.comwrote: 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 [[alternative HTML version deleted]] ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Re: [R-sig-phylo] Dating trees using date.phylo - ape problem?
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.comwrote: 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.comwrote: 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 ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo