diff --git a/lib/R/ape/CITATION b/lib/R/ape/CITATION deleted file mode 100644 index 5c7e11f..0000000 --- a/lib/R/ape/CITATION +++ /dev/null @@ -1,13 +0,0 @@ -citHeader("To cite ape in a publication please use:") - -citEntry(entry="Article", - title = "ape 5.0: an environment for modern phylogenetics and evolutionary analyses in {R}", - author = personList(as.person("E. Paradis"), as.person("K. Schliep")), - journal = "Bioinformatics", - year = "2019", - volume = "35", - pages = "526-528", - - textVersion = "Paradis E. & Schliep K. 2019. ape 5.0: an environment for modern phylogenetics and evolutionary analyses in R. Bioinformatics 35: 526-528.") - -citFooter("As ape is evolving quickly, you may want to cite also its version number (found with 'library(help = ape)' or 'packageVersion(\"ape\")').") diff --git a/lib/R/ape/DESCRIPTION b/lib/R/ape/DESCRIPTION deleted file mode 100644 index a3edcc1..0000000 --- a/lib/R/ape/DESCRIPTION +++ /dev/null @@ -1,85 +0,0 @@ -Package: ape -Version: 5.6-2 -Date: 2022-03-02 -Title: Analyses of Phylogenetics and Evolution -Authors@R: c(person("Emmanuel", "Paradis", role = c("aut", "cre", "cph"), email = "Emmanuel.Paradis@ird.fr", comment = c(ORCID = "0000-0003-3092-2199")), - person("Simon", "Blomberg", role = c("aut", "cph"), comment = c(ORCID = "0000-0003-1062-0839")), - person("Ben", "Bolker", role = c("aut", "cph"), comment = c(ORCID = "0000-0002-2127-0443")), - person("Joseph", "Brown", role = c("aut", "cph"), comment = c(ORCID = "0000-0002-3835-8062")), - person("Santiago", "Claramunt", role = c("aut", "cph"), comment = c(ORCID = "0000-0002-8926-5974")), - person("Julien", "Claude", role = c("aut", "cph"), , comment = c(ORCID = "0000-0002-9267-1228")), - person("Hoa Sien", "Cuong", role = c("aut", "cph")), - person("Richard", "Desper", role = c("aut", "cph")), - person("Gilles", "Didier", role = c("aut", "cph"), comment = c(ORCID = "0000-0003-0596-9112")), - person("Benoit", "Durand", role = c("aut", "cph")), - person("Julien", "Dutheil", role = c("aut", "cph"), comment = c(ORCID = "0000-0001-7753-4121")), - person("RJ", "Ewing", role = c("aut", "cph")), - person("Olivier", "Gascuel", role = c("aut", "cph")), - person("Thomas", "Guillerme", role = c("aut", "cph"), comment = c(ORCID = "0000-0003-4325-1275")), - person("Christoph", "Heibl", role = c("aut", "cph"), comment = c(ORCID = "0000-0002-7655-3299")), - person("Anthony", "Ives", role = c("aut", "cph"), comment = c(ORCID = "0000-0001-9375-9523")), - person("Bradley", "Jones", role = c("aut", "cph"), comment = c(ORCID = "0000-0003-4498-1069")), - person("Franz", "Krah", role = c("aut", "cph"), comment = c(ORCID = "0000-0001-7866-7508")), - person("Daniel", "Lawson", role = c("aut", "cph"), comment = c(ORCID = "0000-0002-5311-6213")), - person("Vincent", "Lefort", role = c("aut", "cph")), - person("Pierre", "Legendre", role = c("aut", "cph"), comment = c(ORCID = "0000-0002-3838-3305")), - person("Jim", "Lemon", role = c("aut", "cph")), - person("Guillaume", "Louvel", role = c("aut", "cph"), comment = c(ORCID = "0000-0002-7745-0785")), - person("Eric", "Marcon", role = c("aut", "cph"), comment = c(ORCID = "0000-0002-5249-321X")), - person("Rosemary", "McCloskey", role = c("aut", "cph"), comment = c(ORCID = "0000-0002-9772-8553")), - person("Johan", "Nylander", role = c("aut", "cph")), - person("Rainer", "Opgen-Rhein", role = c("aut", "cph")), - person("Andrei-Alin", "Popescu", role = c("aut", "cph")), - person("Manuela", "Royer-Carenzi", role = c("aut", "cph")), - person("Klaus", "Schliep", role = c("aut", "cph"), comment = c(ORCID = "0000-0003-2941-0161")), - person("Korbinian", "Strimmer", role = c("aut", "cph"), comment = c(ORCID = "0000-0001-7917-2056")), - person("Damien", "de Vienne", role = c("aut", "cph"), comment = c(ORCID = "0000-0001-9532-5251"))) -Depends: R (>= 3.2.0) -Suggests: gee, expm, igraph, phangorn -Imports: nlme, lattice, graphics, methods, stats, tools, utils, - parallel, Rcpp (>= 0.12.0) -LinkingTo: Rcpp -ZipData: no -Description: Functions for reading, writing, plotting, and manipulating phylogenetic trees, analyses of comparative data in a phylogenetic framework, ancestral character analyses, analyses of diversification and macroevolution, computing distances from DNA sequences, reading and writing nucleotide sequences as well as importing from BioConductor, and several tools such as Mantel's test, generalized skyline plots, graphical exploration of phylogenetic data (alex, trex, kronoviz), estimation of absolute evolutionary rates and clock-like trees using mean path lengths and penalized likelihood, dating trees with non-contemporaneous sequences, translating DNA into AA sequences, and assessing sequence alignments. Phylogeny estimation can be done with the NJ, BIONJ, ME, MVR, SDM, and triangle methods, and several methods handling incomplete distance matrices (NJ*, BIONJ*, MVR*, and the corresponding triangle method). Some functions call external applications (PhyML, Clustal, T-Coffee, Muscle) whose results are returned into R. -License: GPL-2 | GPL-3 -URL: http://ape-package.ird.fr/ -Encoding: UTF-8 -NeedsCompilation: yes -Packaged: 2022-03-02 10:45:23 UTC; paradis -Author: Emmanuel Paradis [aut, cre, cph] - (), - Simon Blomberg [aut, cph] (), - Ben Bolker [aut, cph] (), - Joseph Brown [aut, cph] (), - Santiago Claramunt [aut, cph] (), - Julien Claude [aut, cph] (), - Hoa Sien Cuong [aut, cph], - Richard Desper [aut, cph], - Gilles Didier [aut, cph] (), - Benoit Durand [aut, cph], - Julien Dutheil [aut, cph] (), - RJ Ewing [aut, cph], - Olivier Gascuel [aut, cph], - Thomas Guillerme [aut, cph] (), - Christoph Heibl [aut, cph] (), - Anthony Ives [aut, cph] (), - Bradley Jones [aut, cph] (), - Franz Krah [aut, cph] (), - Daniel Lawson [aut, cph] (), - Vincent Lefort [aut, cph], - Pierre Legendre [aut, cph] (), - Jim Lemon [aut, cph], - Guillaume Louvel [aut, cph] (), - Eric Marcon [aut, cph] (), - Rosemary McCloskey [aut, cph] (), - Johan Nylander [aut, cph], - Rainer Opgen-Rhein [aut, cph], - Andrei-Alin Popescu [aut, cph], - Manuela Royer-Carenzi [aut, cph], - Klaus Schliep [aut, cph] (), - Korbinian Strimmer [aut, cph] (), - Damien de Vienne [aut, cph] () -Maintainer: Emmanuel Paradis -Repository: CRAN -Date/Publication: 2022-03-02 12:30:07 UTC -Built: R 4.2.0; x86_64-pc-linux-gnu; 2022-06-14 02:55:17 UTC; unix diff --git a/lib/R/ape/INDEX b/lib/R/ape/INDEX deleted file mode 100644 index fe49ce6..0000000 --- a/lib/R/ape/INDEX +++ /dev/null @@ -1,216 +0,0 @@ -AAbin Amino Acid Sequences -CADM.global Congruence among distance matrices -DNAbin Manipulate DNA Sequences in Bit-Level Format -DNAbin2indel Recode Blocks of Indels -FastME Tree Estimation Based on the Minimum Evolution - Algorithm -Initialize.corPhyl Initialize a 'corPhyl' Structure Object -LTT Theoretical Lineage-Through Time Plots -MPR Most Parsimonious Reconstruction -Moran.I Moran's I Autocorrelation Index -SDM Construction of Consensus Distance Matrix With - SDM -ace Ancestral Character Estimation -add.scale.bar Add a Scale Bar to a Phylogeny Plot -additive Incomplete Distance Matrix Filling -alex Alignment Explorer With Multiple Devices -all.equal.DNAbin Compare DNA Sets -all.equal.phylo Global Comparison of two Phylogenies -alview Print DNA or AA Sequence Alignement -ape-package Analyses of Phylogenetics and Evolution -apetools Tools to Explore Files -as.alignment Conversion Among DNA Sequence Internal Formats -as.bitsplits Split Frequencies and Conversion Among Split - Classes -as.matching Conversion Between Phylo and Matching Objects -as.phylo Conversion Among Tree and Network Objects -as.phylo.formula Conversion from Taxonomy Variables to - Phylogenetic Trees -axisPhylo Axis on Side of Phylogeny -balance Balance of a Dichotomous Phylogenetic Tree -base.freq Base frequencies from DNA Sequences -bd.ext Extended Version of the Birth-Death Models to - Estimate Speciation and Extinction Rates -bd.time Time-Dependent Birth-Death Models -binaryPGLMM Phylogenetic Generalized Linear Mixed Model for - Binary Data -bind.tree Binds Trees -bionj Tree Estimation Based on an Improved Version of - the NJ Algorithm -bird.families Phylogeny of the Families of Birds From Sibley - and Ahlquist -bird.orders Phylogeny of the Orders of Birds From Sibley - and Ahlquist -birthdeath Estimation of Speciation and Extinction Rates - With Birth-Death Models -boot.phylo Tree Bipartition and Bootstrapping Phylogenies -branching.times Branching Times of a Phylogenetic Tree -c.phylo Building Lists of Trees -carnivora Carnivora body sizes and life history traits -checkAlignment Check DNA Alignments -checkLabel Checking Labels -checkValidPhylo Check the Structure of a "phylo" Object -cherry Number of Cherries and Null Models of Trees -chiroptera Bat Phylogeny -chronoMPL Molecular Dating With Mean Path Lengths -chronopl Molecular Dating With Penalized Likelihood -chronos Molecular Dating by Penalised Likelihood and - Maximum Likelihood -clustal Multiple Sequence Alignment with External - Applications -coalescent.intervals Coalescent Intervals -collapse.singles Collapse Single Nodes -collapsed.intervals Collapsed Coalescent Intervals -compar.cheverud Cheverud's Comparative Method -compar.gee Comparative Analysis with GEEs -compar.lynch Lynch's Comparative Method -compar.ou Ornstein-Uhlenbeck Model for Continuous - Characters -comparePhylo Compare Two "phylo" Objects -compute.brlen Branch Lengths Computation -compute.brtime Compute and Set Branching Times -consensus Concensus Trees -cophenetic.phylo Pairwise Distances from a Phylogenetic Tree -cophyloplot Plots two phylogenetic trees face to face with - links between the tips. -corBlomberg Blomberg et al.'s Correlation Structure -corBrownian Brownian Correlation Structure -corClasses Phylogenetic Correlation Structures -corGrafen Grafen's (1989) Correlation Structure -corMartins Martins's (1997) Correlation Structure -corPagel Pagel's "lambda" Correlation Structure -corphylo Correlations among Multiple Traits with - Phylogenetic Signal -correlogram.formula Phylogenetic Correlogram -data.nex NEXUS Data Example -dbd Probability Density Under Birth-Death Models -def Definition of Vectors for Plotting or - Annotating -degree Vertex Degrees in Trees and Networks -del.gaps Delete Alignment Gaps in DNA Sequences -delta.plot Delta Plots -dist.dna Pairwise Distances from DNA Sequences -dist.gene Pairwise Distances from Genetic Data -dist.topo Topological Distances Between Two Trees -diversi.gof Tests of Constant Diversification Rates -diversi.time Analysis of Diversification with Survival - Models -diversity.contrast.test - Diversity Contrast Test -dnds dN/dS Ratio -drop.tip Remove Tips in a Phylogenetic Tree -edges Draw Additional Edges on a Plotted Tree -evonet Evolutionary Networks -ewLasso Incomplete distances and edge weights of - unrooted topology -gammaStat Gamma-Statistic of Pybus and Harvey -getAnnotationsGenBank Read Annotations from GenBank -hivtree Phylogenetic Tree of 193 HIV-1 Sequences -howmanytrees Calculate Numbers of Phylogenetic Trees -identify.phylo Graphical Identification of Nodes and Tips -image.DNAbin Plot of DNA Sequence Alignement -is.binary Test for Binary Tree -is.compatible Check Compatibility of Splits -is.monophyletic Is Group Monophyletic -is.ultrametric Test if a Tree is Ultrametric -kronoviz Plot Multiple Chronograms on the Same Scale -label2table Label Management -ladderize Ladderize a Tree -latag2n Leading and Trailing Alignment Gaps to N -lmorigin Multiple regression through the origin -ltt.plot Lineages Through Time Plot -makeLabel Label Management -makeNodeLabel Makes Node Labels -mantel.test Mantel Test for Similarity of Two Matrices -mat3 Three Matrices -mat5M3ID Five Trees -mat5Mrand Five Independent Trees -matexpo Matrix Exponential -mcconwaysims.test McConway-Sims Test of Homogeneous - Diversification -mcmc.popsize Reversible Jump MCMC to Infer Demographic - History -mixedFontLabel Mixed Font Labels for Plotting -mrca Find Most Recent Common Ancestors Between Pairs -mst Minimum Spanning Tree -multi2di Collapse and Resolve Multichotomies -multiphylo Manipulating Lists of Trees -mvr Minimum Variance Reduction -nj Neighbor-Joining Tree Estimation -njs Tree Reconstruction from Incomplete Distances - With NJ* or bio-NJ* -node.dating node.dating -node.depth Depth and Heights of Nodes and Tips -nodelabels Labelling the Nodes, Tips, and Edges of a Tree -nodepath Find Paths of Nodes -parafit Test of host-parasite coevolution -pcoa Principal Coordinate Analysis -phydataplot Tree Annotation -phymltest Fits a Bunch of Models with PhyML -pic Phylogenetically Independent Contrasts -pic.ortho Phylogenetically Independent Orthonormal - Contrasts -plot.correlogram Plot a Correlogram -plot.phylo Plot Phylogenies -plot.phylo.extra Extra Fuctions to Plot and Annotate Phylogenies -plot.varcomp Plot Variance Components -plotTreeTime Plot Tree With Time Axis -print.phylo Compact Display of a Phylogeny -rDNAbin Random DNA Sequences -rTraitCont Continuous Character Simulation -rTraitDisc Discrete Character Simulation -rTraitMult Multivariate Character Simulation -read.GenBank Read DNA Sequences from GenBank via Internet -read.caic Read Tree File in CAIC Format -read.dna Read DNA Sequences in a File -read.gff Read GFF Files -read.nexus Read Tree File in Nexus Format -read.nexus.data Read Character Data In NEXUS Format -read.tree Read Tree File in Parenthetic Format -reconstruct Continuous Ancestral Character Estimation -reorder.phylo Internal Reordering of Trees -richness.yule.test Test of Diversification-Shift With the Yule - Process -rlineage Tree Simulation Under the Time-Dependent - Birth-Death Models -root Roots Phylogenetic Trees -rotate Swapping Sister Clades -rtree Generate Random Trees -rtt Root a Tree by Root-to-Tip Regression -seg.sites Find Segregating Sites in DNA Sequences -skyline Skyline Plot Estimate of Effective Population - Size -skylineplot Drawing Skyline Plot Graphs -slowinskiguyer.test Slowinski-Guyer Test of Homogeneous - Diversification -solveAmbiguousBases Solve Ambiguous Bases in DNA Sequences -speciesTree Species Tree Estimation -stree Generates Systematic Regular Trees -subtreeplot Zoom on a Portion of a Phylogeny by Successive - Clicks -subtrees All subtrees of a Phylogenetic Tree -summary.phylo Print Summary of a Phylogeny -trans Translation from DNA to Amino Acid Sequences -treePop Tree Popping -trex Tree Explorer With Multiple Devices -triangMtd Tree Reconstruction Based on the Triangles - Method -unique.multiPhylo Revomes Duplicate Trees -updateLabel Update Labels -varCompPhylip Variance Components with Orthonormal Contrasts -varcomp Compute Variance Component Estimates -vcv Phylogenetic Variance-covariance or Correlation - Matrix -vcv2phylo Variance-Covariance Matrix to Tree -weight.taxo Define Similarity Matrix -where Find Patterns in DNA Sequences -which.edge Identifies Edges of a Tree -woodmouse Cytochrome b Gene Sequences of Woodmice -write.dna Write DNA Sequences in a File -write.nexus Write Tree File in Nexus Format -write.nexus.data Write Character Data in NEXUS Format -write.tree Write Tree File in Parenthetic Format -yule Fits the Yule Model to a Phylogenetic Tree -yule.cov Fits the Yule Model With Covariates -yule.time Fits the Time-Dependent Yule Model -zoom Zoom on a Portion of a Phylogeny diff --git a/lib/R/ape/Meta/Rd.rds b/lib/R/ape/Meta/Rd.rds deleted file mode 100644 index 0499b18..0000000 Binary files a/lib/R/ape/Meta/Rd.rds and /dev/null differ diff --git a/lib/R/ape/Meta/data.rds b/lib/R/ape/Meta/data.rds deleted file mode 100644 index df8c580..0000000 Binary files a/lib/R/ape/Meta/data.rds and /dev/null differ diff --git a/lib/R/ape/Meta/features.rds b/lib/R/ape/Meta/features.rds deleted file mode 100644 index a253595..0000000 Binary files a/lib/R/ape/Meta/features.rds and /dev/null differ diff --git a/lib/R/ape/Meta/hsearch.rds b/lib/R/ape/Meta/hsearch.rds deleted file mode 100644 index 2aae264..0000000 Binary files a/lib/R/ape/Meta/hsearch.rds and /dev/null differ diff --git a/lib/R/ape/Meta/links.rds b/lib/R/ape/Meta/links.rds deleted file mode 100644 index 7e7897d..0000000 Binary files a/lib/R/ape/Meta/links.rds and /dev/null differ diff --git a/lib/R/ape/Meta/nsInfo.rds b/lib/R/ape/Meta/nsInfo.rds deleted file mode 100644 index aa050ea..0000000 Binary files a/lib/R/ape/Meta/nsInfo.rds and /dev/null differ diff --git a/lib/R/ape/Meta/package.rds b/lib/R/ape/Meta/package.rds deleted file mode 100644 index 766c350..0000000 Binary files a/lib/R/ape/Meta/package.rds and /dev/null differ diff --git a/lib/R/ape/Meta/vignette.rds b/lib/R/ape/Meta/vignette.rds deleted file mode 100644 index 2b40a9b..0000000 Binary files a/lib/R/ape/Meta/vignette.rds and /dev/null differ diff --git a/lib/R/ape/NAMESPACE b/lib/R/ape/NAMESPACE deleted file mode 100644 index 4e6bc69..0000000 --- a/lib/R/ape/NAMESPACE +++ /dev/null @@ -1,307 +0,0 @@ -useDynLib(ape, .registration = TRUE) - -export(.compressTipLabel, .PlotPhyloEnv, .uncompressTipLabel, - "[.DNAbin", AAsubst, abbreviateGenus, ace, add.scale.bar, - additive, alex, all.equal.DNAbin, all.equal.phylo, alview, - arecompatible, as.AAbin, as.AAbin.character, as.alignment, - as.bitsplits, as.bitsplits.prop.part, as.character.AAbin, - as.character.DNAbin, as.DNAbin, as.DNAbin.alignment, - as.DNAbin.character, as.DNAbin.list, as.evonet, - as.evonet.phylo, as.hclust.phylo, as.igraph.evonet, - as.igraph.phylo, as.list.AAbin, as.list.DNAbin, as.matching, - as.matching.phylo, as.matrix.DNAbin, as.network.evonet, - as.network.phylo, as.networx.evonet, as.phyDat.AAbin, as.phylo, - as.phylo.evonet, as.phylo.formula, as.phylo.hclust, - as.phylo.matching, as.phylo.phylog, as.prop.part, axisPhylo, - balance, base.freq, bd.ext, bd.time, binaryPGLMM, - binaryPGLMM.sim, bind.tree, bionj, bionjs, biplot.pcoa, - birthdeath, bitsplits, boot.phylo, BOTHlabels, branching.times, - bydir, c.DNAbin, CADM.global, CADM.post, cbind.DNAbin, - checkAlignment, checkLabel, checkValidPhylo, cherry, chronoMPL, - chronopl, chronos, chronos.control, circular.plot, cladewise, - cladogram.plot, clustal, clustalomega, coalescent.intervals, - collapse.singles, collapsed.intervals, compar.cheverud, - compar.gee, compar.lynch, compar.ou, comparePhylo, complement, - compute.brlen, compute.brtime, consensus, cophenetic.phylo, - cophyloplot, corBlomberg, corBrownian, corGrafen, corMartins, - corPagel, corphylo, correlogram.formula, countBipartitions, - dbd, dbdTime, def, degree, del.colgapsonly, del.gaps, - del.rowgapsonly, delta.plot, deviance.ace, di2multi, - di2multi.multiPhylo, di2multi.phylo, dist.aa, dist.dna, - dist.gene, dist.nodes, dist.topo, diversi.gof, diversi.time, - diversity.contrast.test, DNAbin2indel, dnds, - drawSupportOnEdges, drop.fossil, drop.tip, dyule, edgelabels, - edges, editFileExtensions, estimate.dates, estimate.mu, evonet, - ewLasso, extract.clade, extract.popsize, fancyarrows, - fastme.bal, fastme.ols, find.skyline.epsilon, floating.pie.asp, - Ftab, gammaStat, GC.content, getAnnotationsGenBank, getMRCA, - has.singles, howmanytrees, image.AAbin, image.DNAbin, - is.binary, is.binary.multiPhylo, is.binary.phylo, - is.binary.tree, is.compatible, is.compatible.bitsplits, - is.monophyletic, is.rooted, is.rooted.multiPhylo, - is.rooted.phylo, is.ultrametric, is.ultrametric.multiPhylo, - is.ultrametric.phylo, keep.tip, kronoviz, label2table, - labels.DNAbin, ladderize, LargeNumber, latag2n, lmorigin, LTT, - ltt.coplot, ltt.lines, ltt.plot, ltt.plot.coords, - makeChronosCalib, makeLabel, makeLabel.character, - makeNodeLabel, mantel.test, matexpo, mcconwaysims.test, - mcmc.popsize, mixedFontLabel, mltt.plot, Moran.I, MPR, mrca, - mst, multi2di, multi2di.multiPhylo, multi2di.phylo, muscle, - mvr, mvrs, Nedge, Nedge.evonet, Nedge.multiPhylo, Nedge.phylo, - new2old.phylo, nexus2DNAbin, nj, njs, Nnode, Nnode.multiPhylo, - Nnode.phylo, node.depth, node.depth.edgelength, node.height, - nodelabels, nodepath, Ntip, Ntip.multiPhylo, Ntip.phylo, - old2new.phylo, ONEwise, SHORTwise, parafit, pcoa, - perm.rowscols, phydataplot, phylogram.plot, phymltest, pic, - pic.ortho, plot.evonet, plot.multiPhylo, plot.phylo, - plotBreakLongEdges, plotPhyloCoor, plotTreeTime, polar2rect, - postorder, postprocess.prop.part, print.AAbin, print.DNAbin, - print.phylo, prop.clades, prop.part, rbdtree, rbind.DNAbin, - rcoal, rDNAbin, read.caic, read.dna, read.evonet, read.FASTA, - read.fastq, read.GenBank, read.gff, read.nexus, - read.nexus.data, read.tree, reconstruct, rect2polar, - reorder.evonet, reorder.multiPhylo, reorder.phylo, reorderRcpp, - richness.yule.test, ring, rlineage, rmtree, root, - root.multiPhylo, root.phylo, rotate, rotateConstr, rphylo, - rmtopology, rtopology, rTraitCont, rTraitDisc, rTraitMult, - rtree, rtt, SDM, seg.sites, skyline, skylineplot, - skylineplot.deluxe, slowinskiguyer.test, solveAmbiguousBases, - speciesTree, stree, stripLabel, subtreeplot, subtrees, - summary.phylo, tcoffee, tiplabels, trans, treePop, trex, - triangMtd, triangMtds, ultrametric, unique.multiPhylo, unroot, - unroot.multiPhylo, unroot.phylo, unrooted.xy, updateLabel, - varcomp, varCompPhylip, vcv, vcv.corPhyl, vcv.phylo, vcv2phylo, - weight.taxo, weight.taxo2, where, which.edge, write.dna, - write.evonet, write.FASTA, write.nexus, write.nexus.data, - write.tree, Xplor, Xplorefiles, yule, yule.cov, yule.time, - zoom, node_depth, node_depth_edgelength, node_height, - node_height_clado, seq_root2tip) - -importFrom(graphics, abline, arrows, axTicks, axis, barplot, boxplot, bxp, - close.screen, identify, image, image.default, layout, legend, - lines, locator, mtext, par, plot, plot.default, points, polygon, - rect, screen, segments, split.screen, strheight, strwidth, - symbols, text, title, xinch, yinch) -importFrom(grDevices, col2rgb, dev.cur, dev.new, dev.off, dev.set, - devAskNewPage, deviceIsInteractive, grey, rainbow, rgb, - topo.colors) -importFrom(lattice, xyplot, panel.lines, panel.points) -importFrom(methods, as, show) -importFrom(nlme, corMatrix, Dim, getCovariate, getCovariateFormula, - getGroups, getGroupsFormula, gls, Initialize) -importFrom(stats, AIC, anova, as.dist, as.hclust, biplot, coef, complete.cases, - cophenetic, cor, cor.test, cov, cov2cor, density, dgamma, - dpois, drop1, formula, gaussian, glm, hclust, integrate, - lm, mahalanobis, median, model.frame, model.matrix, - model.response, na.fail, na.omit, nlm, nlminb, optim, optimize, - p.adjust, pchisq, pf, pgamma, pnorm, ppois, printCoefmat, pt, - qbinom, qnorm, qt, quantile, quasibinomial, rbinom, reorder, resid, - rexp, rgamma, rnorm, runif, sd, setNames, terms, uniroot, var, - wilcox.test) -importFrom(utils, browseURL, download.file, edit, read.table, str) -importFrom(parallel, mclapply) -importFrom(Rcpp, sourceCpp) - -## Methods for the classes defined in ape, including for the generics -## defined in ape (see also below). Some methods are exported above. - -S3method(is.binary, tree) # to delete when removing the function AS WELL FROM THE LIST OF EXPORTED OBJECTS ABOVE - -S3method("[", AAbin) -S3method(as.character, AAbin) -S3method(as.list, AAbin) -S3method(as.matrix, AAbin) -S3method(c, AAbin) -S3method(cbind, AAbin) -S3method(image, AAbin) -S3method(labels, AAbin) -S3method(print, AAbin) -S3method(rbind, AAbin) -S3method(updateLabel, AAbin) - -S3method(AIC, ace) -S3method(anova, ace) -S3method(deviance, ace) -S3method(logLik, ace) -S3method(print, ace) - -S3method(print, binaryPGLMM) - -S3method(as.prop.part, bitsplits) -S3method(is.compatible, bitsplits) -S3method(print, bitsplits) -S3method(sort, bitsplits) - -S3method(drop1, compar.gee) -S3method(predict, compar.gee) -S3method(print, compar.gee) - -S3method(print, corphylo) - -S3method("[", DNAbin) -S3method(all.equal, DNAbin) -S3method(as.character, DNAbin) -S3method(as.list, DNAbin) -S3method(as.matrix, DNAbin) -S3method(c, DNAbin) -S3method(cbind, DNAbin) -S3method(image, DNAbin) -S3method(labels, DNAbin) -S3method(makeLabel, DNAbin) -S3method(print, DNAbin) -S3method(rbind, DNAbin) -S3method(updateLabel, DNAbin) - -S3method(as.phylo, evonet) -S3method(degree, evonet) -S3method(Nedge, evonet) -S3method(plot, evonet) -S3method(print, evonet) -S3method(reorder, evonet) -S3method(updateLabel, evonet) - -S3method("[", multiPhylo) -S3method("[<-", multiPhylo) -S3method("[[", multiPhylo) -S3method("[[<-", multiPhylo) -S3method("$", multiPhylo) -S3method("$<-", multiPhylo) -S3method(c, multiPhylo) -S3method(di2multi, multiPhylo) -S3method(is.binary, multiPhylo) -S3method(is.rooted, multiPhylo) -S3method(is.ultrametric, multiPhylo) -S3method(makeLabel, multiPhylo) -S3method(multi2di, multiPhylo) -S3method(Nedge, multiPhylo) -S3method(Nnode, multiPhylo) -S3method(Ntip, multiPhylo) -S3method(plot, multiPhylo) -S3method(print, multiPhylo) -S3method(reorder, multiPhylo) -S3method(root, multiPhylo) -S3method(str, multiPhylo) -S3method(unique, multiPhylo) -S3method(unroot, multiPhylo) - -S3method("+", phylo) -S3method(all.equal, phylo) -S3method(as.hclust, phylo) -S3method(as.matching, phylo) -S3method(coalescent.intervals, phylo) -S3method(c, phylo) -S3method(cophenetic, phylo) -S3method(degree, phylo) -S3method(di2multi, phylo) -S3method(identify, phylo) -S3method(is.binary, phylo) -S3method(is.rooted, phylo) -S3method(is.ultrametric, phylo) -S3method(makeLabel, phylo) -S3method(multi2di, phylo) -S3method(Nedge, phylo) -S3method(Nnode, phylo) -S3method(Ntip, phylo) -S3method(plot, phylo) -S3method(print, phylo) -S3method(reorder, phylo) -S3method(root, phylo) -S3method(skyline, phylo) -S3method(summary, phylo) -S3method(unroot, phylo) -S3method(updateLabel, phylo) -S3method(vcv, phylo) - -S3method(plot, phymltest) -S3method(print, phymltest) -S3method(summary, phymltest) - -S3method(lines, popsize) -S3method(plot, popsize) - -S3method(as.bitsplits, prop.part) -S3method(plot, prop.part) -S3method(print, prop.part) -S3method(summary, prop.part) - -S3method(lines, skyline) -S3method(plot, skyline) - -## Methods for PGLS: - -## methods of coef() from stats: -S3method(coef, corBlomberg) -S3method(coef, corBrownian) -S3method(coef, corGrafen) -S3method(coef, corMartins) -S3method(coef, corPagel) - -## methods to work with nlme: -S3method(corMatrix, corBlomberg) -S3method(corMatrix, corBrownian) -S3method(corMatrix, corGrafen) -S3method(corMatrix, corMartins) -S3method(corMatrix, corPagel) -S3method(Initialize, corPhyl) - -## Miscellaneous classes for which there is only one method: - -S3method(biplot, pcoa) - -S3method(plot, correlogram) -S3method(plot, correlogramList) -S3method(plot, mst) -S3method(plot, varcomp) - -S3method(print, birthdeath) -S3method(print, bitsplits) -S3method(print, chronos) -S3method(print, comparePhylo) -S3method(print, LargeNumber) -S3method(print, lmorigin) -S3method(print, parafit) - -## Other methods of the generics defined in ape: - -S3method(as.AAbin, AAMultipleAlignment) -S3method(as.AAbin, AAString) -S3method(as.AAbin, AAStringSet) -S3method(as.AAbin, character) -S3method(as.AAbin, list) - -S3method(as.DNAbin, alignment) -S3method(as.DNAbin, character) -S3method(as.DNAbin, DNAMultipleAlignment) -S3method(as.DNAbin, DNAString) -S3method(as.DNAbin, DNAStringSet) -S3method(as.DNAbin, list) -S3method(as.DNAbin, PairwiseAlignmentsSingleSubject) - -S3method(as.evonet, phylo) - -S3method(as.phylo, formula) -S3method(as.phylo, hclust) -S3method(as.phylo, matching) -S3method(as.phylo, phylog) - -S3method(coalescent.intervals, default) - -S3method(makeLabel, character) - -S3method(skyline, coalescentIntervals) -S3method(skyline, collapsedIntervals) - -S3method(updateLabel, character) -S3method(updateLabel, data.frame) -S3method(updateLabel, matrix) - -S3method(vcv, corPhyl) - -if (getRversion() >= "3.6.0") { - ##S3method(phangorn::as.phyDat, AAbin) - S3method(network::as.network, phylo) - S3method(igraph::as.igraph, phylo) - ##S3method(phangorn::as.networx, evonet) - S3method(network::as.network, evonet) - S3method(igraph::as.igraph, evonet) -} diff --git a/lib/R/ape/NEWS b/lib/R/ape/NEWS deleted file mode 100644 index 15c090b..0000000 --- a/lib/R/ape/NEWS +++ /dev/null @@ -1,3 +0,0 @@ -See: - -http://ape-package.ird.fr/NEWS diff --git a/lib/R/ape/R/ape b/lib/R/ape/R/ape deleted file mode 100644 index 6686156..0000000 --- a/lib/R/ape/R/ape +++ /dev/null @@ -1,27 +0,0 @@ -# File share/R/nspackloader.R -# Part of the R package, https://www.R-project.org -# -# Copyright (C) 1995-2012 The R Core Team -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# A copy of the GNU General Public License is available at -# https://www.r-project.org/Licenses/ - -local({ - info <- loadingNamespaceInfo() - pkg <- info$pkgname - ns <- .getNamespace(as.name(pkg)) - if (is.null(ns)) - stop("cannot find namespace environment for ", pkg, domain = NA); - dbbase <- file.path(info$libname, pkg, "R", pkg) - lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.") -}) diff --git a/lib/R/ape/R/ape.rdb b/lib/R/ape/R/ape.rdb deleted file mode 100644 index f8b87bc..0000000 Binary files a/lib/R/ape/R/ape.rdb and /dev/null differ diff --git a/lib/R/ape/R/ape.rdx b/lib/R/ape/R/ape.rdx deleted file mode 100644 index 46e08e0..0000000 Binary files a/lib/R/ape/R/ape.rdx and /dev/null differ diff --git a/lib/R/ape/data/HP.links.rda b/lib/R/ape/data/HP.links.rda deleted file mode 100644 index c05999d..0000000 Binary files a/lib/R/ape/data/HP.links.rda and /dev/null differ diff --git a/lib/R/ape/data/bird.families.rda b/lib/R/ape/data/bird.families.rda deleted file mode 100644 index 9816415..0000000 Binary files a/lib/R/ape/data/bird.families.rda and /dev/null differ diff --git a/lib/R/ape/data/bird.orders.rda b/lib/R/ape/data/bird.orders.rda deleted file mode 100644 index bd5ffef..0000000 Binary files a/lib/R/ape/data/bird.orders.rda and /dev/null differ diff --git a/lib/R/ape/data/carnivora.csv.gz b/lib/R/ape/data/carnivora.csv.gz deleted file mode 100644 index 8af3824..0000000 Binary files a/lib/R/ape/data/carnivora.csv.gz and /dev/null differ diff --git a/lib/R/ape/data/chiroptera.rda b/lib/R/ape/data/chiroptera.rda deleted file mode 100644 index ff55345..0000000 Binary files a/lib/R/ape/data/chiroptera.rda and /dev/null differ diff --git a/lib/R/ape/data/cynipids.rda b/lib/R/ape/data/cynipids.rda deleted file mode 100644 index d0e814a..0000000 Binary files a/lib/R/ape/data/cynipids.rda and /dev/null differ diff --git a/lib/R/ape/data/gopher.D.rda b/lib/R/ape/data/gopher.D.rda deleted file mode 100644 index 5d8f617..0000000 Binary files a/lib/R/ape/data/gopher.D.rda and /dev/null differ diff --git a/lib/R/ape/data/hivtree.newick.rda b/lib/R/ape/data/hivtree.newick.rda deleted file mode 100644 index d35681c..0000000 Binary files a/lib/R/ape/data/hivtree.newick.rda and /dev/null differ diff --git a/lib/R/ape/data/hivtree.table.txt.gz b/lib/R/ape/data/hivtree.table.txt.gz deleted file mode 100644 index 9bdc710..0000000 Binary files a/lib/R/ape/data/hivtree.table.txt.gz and /dev/null differ diff --git a/lib/R/ape/data/lice.D.rda b/lib/R/ape/data/lice.D.rda deleted file mode 100644 index 6a66396..0000000 Binary files a/lib/R/ape/data/lice.D.rda and /dev/null differ diff --git a/lib/R/ape/data/lmorigin.ex1.rda b/lib/R/ape/data/lmorigin.ex1.rda deleted file mode 100644 index e1e8c7c..0000000 Binary files a/lib/R/ape/data/lmorigin.ex1.rda and /dev/null differ diff --git a/lib/R/ape/data/lmorigin.ex2.rda b/lib/R/ape/data/lmorigin.ex2.rda deleted file mode 100644 index eebc812..0000000 Binary files a/lib/R/ape/data/lmorigin.ex2.rda and /dev/null differ diff --git a/lib/R/ape/data/mat3.RData b/lib/R/ape/data/mat3.RData deleted file mode 100644 index e41691b..0000000 Binary files a/lib/R/ape/data/mat3.RData and /dev/null differ diff --git a/lib/R/ape/data/mat5M3ID.RData b/lib/R/ape/data/mat5M3ID.RData deleted file mode 100644 index 62b55ee..0000000 Binary files a/lib/R/ape/data/mat5M3ID.RData and /dev/null differ diff --git a/lib/R/ape/data/mat5Mrand.RData b/lib/R/ape/data/mat5Mrand.RData deleted file mode 100644 index b47aa25..0000000 Binary files a/lib/R/ape/data/mat5Mrand.RData and /dev/null differ diff --git a/lib/R/ape/data/woodmouse.rda b/lib/R/ape/data/woodmouse.rda deleted file mode 100644 index 8b9ef61..0000000 Binary files a/lib/R/ape/data/woodmouse.rda and /dev/null differ diff --git a/lib/R/ape/doc/DrawingPhylogenies.R b/lib/R/ape/doc/DrawingPhylogenies.R deleted file mode 100644 index b00aade..0000000 --- a/lib/R/ape/doc/DrawingPhylogenies.R +++ /dev/null @@ -1,498 +0,0 @@ -### R code from vignette source 'DrawingPhylogenies.Rnw' - -################################################### -### code chunk number 1: DrawingPhylogenies.Rnw:16-17 -################################################### -options(width = 80, prompt = "> ") - - -################################################### -### code chunk number 2: DrawingPhylogenies.Rnw:61-63 -################################################### -library(ape) -mytr <- read.tree(text = "((Pan:5,Homo:5):2,Gorilla:7);") - - -################################################### -### code chunk number 3: DrawingPhylogenies.Rnw:69-75 -################################################### -foo <- function() { - col <- "green" - for (i in 1:2) - axis(i, col = col, col.ticks = col, col.axis = col, las = 1) - box(lty = "19") -} - - -################################################### -### code chunk number 4: DrawingPhylogenies.Rnw:82-89 -################################################### -layout(matrix(1:4, 2, 2, byrow = TRUE)) -plot(mytr); foo() -plot(mytr, "c", FALSE); foo() -plot(mytr, "u"); foo() -par(xpd = TRUE) -plot(mytr, "f"); foo() -box("outer") - - -################################################### -### code chunk number 5: DrawingPhylogenies.Rnw:135-137 -################################################### -tr <- compute.brlen(stree(8, "l"), 0.1) -tr$tip.label[] <- "" - - -################################################### -### code chunk number 6: DrawingPhylogenies.Rnw:144-150 -################################################### -foo <- function() { - col <- "green" - axis(1, col = col, col.ticks = col, col.axis = col) - axis(2, col = col, col.ticks = col, col.axis = col, at = 1:Ntip(tr), las = 1) - box(lty = "19") -} - - -################################################### -### code chunk number 7: DrawingPhylogenies.Rnw:152-152 -################################################### - - - -################################################### -### code chunk number 8: DrawingPhylogenies.Rnw:155-165 -################################################### -layout(matrix(1:12, 6, 2)) -par(mar = c(2, 2, 0.3, 0)) -for (type in c("p", "c")) { - plot(tr, type); foo() - plot(tr, type, node.pos = 2); foo() - plot(tr, type, FALSE); foo() - plot(tr, type, FALSE, node.pos = 1, node.depth = 2); foo() - plot(tr, type, FALSE, node.pos = 2); foo() - plot(tr, type, FALSE, node.pos = 2, node.depth = 2); foo() -} - - -################################################### -### code chunk number 9: DrawingPhylogenies.Rnw:173-178 -################################################### -foo <- function() { - col <- "green" - for (i in 1:2) axis(i, col = col, col.ticks = col, col.axis = col, las = 1) - box(lty = "19") -} - - -################################################### -### code chunk number 10: DrawingPhylogenies.Rnw:181-187 -################################################### -layout(matrix(1:4, 2, 2)) -par(las = 1) -plot(tr, "u"); foo() -plot(tr, "u", FALSE); foo() -plot(tr, "f"); foo() -plot(tr, "f", FALSE); foo() - - -################################################### -### code chunk number 11: DrawingPhylogenies.Rnw:257-259 -################################################### -args(node.depth.edgelength) -args(node.depth) - - -################################################### -### code chunk number 12: DrawingPhylogenies.Rnw:271-272 -################################################### -args(node.height) - - -################################################### -### code chunk number 13: DrawingPhylogenies.Rnw:288-289 -################################################### -args(unrooted.xy) - - -################################################### -### code chunk number 14: DrawingPhylogenies.Rnw:296-299 -################################################### -args(phylogram.plot) -args(cladogram.plot) -args(circular.plot) - - -################################################### -### code chunk number 15: DrawingPhylogenies.Rnw:315-316 -################################################### -args(plot.phylo) - - -################################################### -### code chunk number 16: DrawingPhylogenies.Rnw:369-370 -################################################### -geo <- factor(c("Africa", "World", "Africa")) - - -################################################### -### code chunk number 17: DrawingPhylogenies.Rnw:378-380 -################################################### -(mycol <- c("blue", "red")[geo]) -plot(mytr, tip.color = mycol) - - -################################################### -### code chunk number 18: DrawingPhylogenies.Rnw:392-394 -################################################### -par(xpd = TRUE) -plot(mytr, tip.color = mycol, cex = c(1, 1, 1.5)) - - -################################################### -### code chunk number 19: DrawingPhylogenies.Rnw:401-402 -################################################### -args(def) - - -################################################### -### code chunk number 20: DrawingPhylogenies.Rnw:413-415 -################################################### -mycol2 <- def(mytr$tip.label, Homo = "red", default = "blue") -identical(mycol, mycol2) - - -################################################### -### code chunk number 21: DrawingPhylogenies.Rnw:436-442 -################################################### -(i <- which.edge(mytr, c("Homo", "Pan"))) -co <- rep("black", Nedge(mytr)) -co[i] <- "blue" -par(xpd = TRUE) -plot(mytr, edge.col = co) -edgelabels() - - -################################################### -### code chunk number 22: DrawingPhylogenies.Rnw:480-481 -################################################### -args(axisPhylo) - - -################################################### -### code chunk number 23: DrawingPhylogenies.Rnw:493-494 -################################################### -args(add.scale.bar) - - -################################################### -### code chunk number 24: DrawingPhylogenies.Rnw:506-510 -################################################### -plot(mytr) -add.scale.bar() -axisPhylo() -axis(3) - - -################################################### -### code chunk number 25: DrawingPhylogenies.Rnw:520-523 -################################################### -args(nodelabels) -args(tiplabels) -args(edgelabels) - - -################################################### -### code chunk number 26: DrawingPhylogenies.Rnw:535-540 -################################################### -par(xpd = TRUE) -plot(mytr) -nodelabels() -tiplabels() -edgelabels() - - -################################################### -### code chunk number 27: DrawingPhylogenies.Rnw:563-566 -################################################### -plot(rep(1:5, 5), rep(1:5, each = 5), pch = 1:25, xlim = c(1, 5.2), - col = "blue", bg = "yellow", cex = 2) -text(rep(1:5, 5) + 0.2, rep(1:5, each = 5), 1:25) - - -################################################### -### code chunk number 28: DrawingPhylogenies.Rnw:583-593 -################################################### -v <- c(0, 0.5, 1) -layout(matrix(1:9, 3, 3)) -par(mar = c(3, 3, 3, 0), las = 1) -for (i in v) { - for (j in v) { - plot(0, 0, "n", main = paste0("adj = c(", i, ", ", j, ")")) - abline(v = 0, h = 0, lty = 3) - text(0, 0, "Gorilla", adj = c(i, j)) - } -} - - -################################################### -### code chunk number 29: DrawingPhylogenies.Rnw:601-605 -################################################### -plot(rep(0, 3), 0:2, "n", las = 1) -abline(v = 0, h = 0:2, lty = 3) -text(0, 0:2, mytr$tip.label, adj = -1) -text(0, 0:2, mytr$tip.label, adj = 2, font = 2) - - -################################################### -### code chunk number 30: DrawingPhylogenies.Rnw:623-625 -################################################### -args(phydataplot) -args(ring) - - -################################################### -### code chunk number 31: DrawingPhylogenies.Rnw:677-679 -################################################### -x <- matrix(1:6, 3, 10) -dimnames(x) <- list(c("Homo", "Gorilla", "Pan"), LETTERS[1:ncol(x)]) - - -################################################### -### code chunk number 32: DrawingPhylogenies.Rnw:685-687 -################################################### -x -mytr$tip.label - - -################################################### -### code chunk number 33: DrawingPhylogenies.Rnw:699-705 -################################################### -par(mar = c(10, 2, 5, 5)) -plot(mytr, x.lim = 30) -phydataplot(x, mytr, "m", border = "white", offset = 2, width = 1) -phydataplot(x, mytr, "m", border = "white", offset = 15, - width = 1, continuous = 2) - - - -################################################### -### code chunk number 34: DrawingPhylogenies.Rnw:718-728 -################################################### -n <- 100 -p <- 3 -set.seed(3) -tr <- rcoal(n) -x <- matrix(runif(p * n), n, p) -rownames(x) <- tr$tip.label -COL <- c("red", "green", "blue") -par(xpd = TRUE) -plot(tr, "f", x.lim = c(-5, 5), show.tip.label = FALSE, no.margin = TRUE) -for (j in 1:p) ring(x[, j], tr, offset = j - 1 + 0.1, col = COL[j]) - - -################################################### -### code chunk number 35: DrawingPhylogenies.Rnw:754-759 -################################################### -tree <- rtree(10) -tree$edge.length[1] <- 1000 -layout(matrix(1:2, 1)) -plot(tree); axisPhylo() -plotBreakLongEdges(tree); axisPhylo() - - -################################################### -### code chunk number 36: DrawingPhylogenies.Rnw:767-769 -################################################### -el <- tree$edge.length -sum(el > mean(el) + 2 * sd(el)) - - -################################################### -### code chunk number 37: DrawingPhylogenies.Rnw:774-780 -################################################### -tree$edge.length[8] <- 1000 -el <- tree$edge.length -sum(el > mean(el) + 2 * sd(el)) -layout(matrix(1:2, 1)) -plotBreakLongEdges(tree) -plotBreakLongEdges(tree, n = 2) - - -################################################### -### code chunk number 38: DrawingPhylogenies.Rnw:804-806 -################################################### -TR <- replicate(10, rcoal(sample(11:20, size = 1)), simplify = FALSE) -kronoviz(TR, type = "c", show.tip.label = FALSE) - - -################################################### -### code chunk number 39: DrawingPhylogenies.Rnw:817-820 -################################################### -dates <- as.Date(.leap.seconds) -tr <- rcoal(length(dates)) -plotTreeTime(tr, dates) - - -################################################### -### code chunk number 40: DrawingPhylogenies.Rnw:833-840 -################################################### -par(oma = rep(2, 4)) -plot(mytr) -box(lty = 3) -box("figure", col = "blue") -for (i in 1:4) - mtext("Outer margin", i, 0.5, outer = TRUE, font = 2, col = "blue") -box("outer") - - -################################################### -### code chunk number 41: DrawingPhylogenies.Rnw:856-867 -################################################### -layout(matrix(1:4, 2, 2)) -par(oma = rep(2, 4)) -for (i in 1:4) { - par(mar = rep(i, 4)) - plot(mytr) - box(lty = 3) - box("figure", col = "blue") -} -for (i in 1:4) - mtext("Outer margin", i, 0.5, outer = TRUE, font = 2, col = "blue") -box("outer") - - -################################################### -### code chunk number 42: DrawingPhylogenies.Rnw:885-887 -################################################### -layout(matrix(c(1, 2, 1, 3), 2, 2)) -for (i in 1:3) plot(rtree(5)) - - -################################################### -### code chunk number 43: DrawingPhylogenies.Rnw:906-907 -################################################### -(pp <- get("last_plot.phylo", envir = .PlotPhyloEnv)) - - -################################################### -### code chunk number 44: DrawingPhylogenies.Rnw:972-1029 -################################################### -## split the device into 2: -layout(matrix(1:2, 2)) -## plot the 1st tree -plot(rtree(4)) -## get the parameters of this first plot: -pp <- get("last_plot.phylo", envir = .PlotPhyloEnv) -## keep the coordinates of the first tip: -x <- pp$xx[1] -y <- pp$yy[1] -## extremes of the coordinates on both axes: -(pu <- par("usr")) -## fraction of the plot region: -(x - pu[1]) / (pu[2] - pu[1]) -(y - pu[3]) / (pu[4] - pu[3]) -## get the dimensions of plotting region and margins in inches: -pi <- par("pin") -mi <- par("mai") -## convert the coordinates into inches: -xi1 <- (x - pu[1]) / (pu[2] - pu[1]) * pi[1] + mi[2] -yi1 <- (y - pu[3]) / (pu[4] - pu[3]) * pi[2] + mi[1] - -## xi1 and yi1 are the final coordinates of this tip in inches - -## plot the 2nd tree: -plot(rtree(4)) -## same as above: -pp <- get("last_plot.phylo", envir = .PlotPhyloEnv) -## ... except we take the coordinates of the root: -x <- pp$xx[5] -y <- pp$yy[5] -pu <- par("usr") -pi <- par("pin") -mi <- par("mai") -xi2 <- (x - pu[1]) / (pu[2] - pu[1]) * pi[1] + mi[2] -yi2 <- (y - pu[3]) / (pu[4] - pu[3]) * pi[2] + mi[1] - -## xi2 and yi2 are the final coordinates of this root in inches - -## we add the height of this second plot to the 'y' coordinate -## of the first tip of the first tree which is above the second -## one according to layout() -yi1 <- yi1 + par("fin")[2] -## => this operation depends on the specific layout of plots - -## get the dimension of the device in inches: -di <- par("din") - -## reset the layout -layout(1) -## set new = TRUE and the margins to zero: -par(new = TRUE, mai = rep(0, 4)) -## set the scales to be [0,1] on both axes (in user coordinates): -plot(NA, type = "n", ann = FALSE, axes = FALSE, xlim = 0:1, - ylim = 0:1, xaxs = "i", yaxs = "i") -## graphical elements can now be added: -fancyarrows(xi1/di[1], yi1/di[2], xi2/di[1], yi2/di[2], 1, - lwd = 10, col = rgb(1, .5, 0, .5), type = "h") - - -################################################### -### code chunk number 45: DrawingPhylogenies.Rnw:1039-1074 -################################################### -foo <- function(phy1, phy2, from) -{ - layout(matrix(1:2, 2)) - plot(phy1, font = 1) - pp <- get("last_plot.phylo", envir = .PlotPhyloEnv) - from <- which(phy1$tip.label == from) - x <- pp$xx[from] - y <- pp$yy[from] - ## fraction of the plot region: - pu <- par("usr") - ## convert into inches: - pi <- par("pin") - mi <- par("mai") - xi1 <- (x - pu[1]) / (pu[2] - pu[1]) * pi[1] + mi[2] - yi1 <- (y - pu[3]) / (pu[4] - pu[3]) * pi[2] + mi[1] - plot(phy2) - pp <- get("last_plot.phylo", envir = .PlotPhyloEnv) - to <- Ntip(phy2) + 1 - x <- pp$xx[to] - y <- pp$yy[to] - ## same as above: - pu <- par("usr") - pi <- par("pin") - mi <- par("mai") - xi2 <- (x - pu[1]) / (pu[2] - pu[1]) * pi[1] + mi[2] - yi2 <- (y - pu[3]) / (pu[4] - pu[3]) * pi[2] + mi[1] - yi1 <- yi1 + par("fin")[2] - di <- par("din") - layout(1) - par(new = TRUE, mai = rep(0, 4)) - plot(NA, type = "n", ann = FALSE, axes = FALSE, xlim = 0:1, - ylim = 0:1, xaxs = "i", yaxs = "i") - fancyarrows(xi1/di[1], yi1/di[2], xi2/di[1], yi2/di[2], 1, - lwd = 10, col = rgb(1, .5, 0, .5), type = "h") -} - - -################################################### -### code chunk number 46: DrawingPhylogenies.Rnw:1080-1083 -################################################### -trb <- read.tree(text = "((Primates,Carnivora),Monotremata);") -par(xpd = TRUE) -foo(trb, mytr, "Primates") - - -################################################### -### code chunk number 47: DrawingPhylogenies.Rnw:1100-1106 -################################################### -plot(mytr, plot = FALSE) -pp <- get("last_plot.phylo", envir = .PlotPhyloEnv) -rect(pp$xx[5] - 0.1, pp$yy[1] - 0.1, pp$xx[1] + 2, pp$yy[2] + 0.1, - col = "yellow", border = NA) -par(new = TRUE) -plot(mytr) - - diff --git a/lib/R/ape/doc/DrawingPhylogenies.Rnw b/lib/R/ape/doc/DrawingPhylogenies.Rnw deleted file mode 100644 index d3d3bd2..0000000 --- a/lib/R/ape/doc/DrawingPhylogenies.Rnw +++ /dev/null @@ -1,1120 +0,0 @@ -\documentclass[a4paper]{article} -%\VignetteIndexEntry{Drawing Phylogenies} -%\VignettePackage{ape} -\usepackage{ape} - -\author{Emmanuel Paradis} -\title{Drawing Phylogenies in \R: Basic and Advanced Features With \pkg{ape}} - -\begin{document} -\DefineVerbatimEnvironment{Sinput}{Verbatim}{formatcom=\color{darkblue}} -\DefineVerbatimEnvironment{Soutput}{Verbatim}{formatcom=\color{black}\vspace{-1.5em}} - -\maketitle -\tableofcontents\vspace*{1pc}\hrule - -<>= -options(width = 80, prompt = "> ") -@ - -\vspace{1cm} - -\section{Introduction} - -Graphical functions have been present in \ape\ since its first version -(0.1, released in August 2002). Over the years, these tools have been -improved to become quite sophisticated although complicated to use -efficiently. This document gives an overview of these functionalities. -Section~\ref{sec:basic} explains the basic concepts -and tools behind graphics in \ape. A figure made with \ape\ usually -starts by calling the function \code{plot.phylo} which is detailed in -Section~\ref{sec:plotphylo}, and further graphical annotations can be done with -functions covered in Section~\ref{sec:annot}. Section~\ref{sec:spec} -shows some specialized functions available in \ape, and finally, -Sections~\ref{sec:geom} and \ref{sec:build} give an overview of some -ideas to help making complicated figures. - -\section{Basic Concepts}\label{sec:basic} - -The core of \ape's graphical tools is the \code{plot} method for the -class \code{"phylo"}, the function \code{plot.phylo}. This function is -studied in details in Section~\ref{sec:plotphylo}, but first we see -the basic ideas behind it and other functions mentioned in this -document. - -\subsection{Graphical Model} - -The graphical functions in \ape\ use the package \pkg{graphics}. -Overall, the conventions of this package are followed quite -closely (see Murrell's book \cite{Murrell2006}), so users familiar -with graphics in \R\ are expected to find their way relatively easily when -plotting phylogenies with \ape. - -\ape\ has several functions to perform computations before drawing a -tree, so that they may be used to implement the same graphical -functionalities with other graphical engines such as the \pkg{grid} -package. These functions are detailed in the next section. - -To start simply, we build a small tree with three genera of primates -which we will use in several examples in this document: - -<<>>= -library(ape) -mytr <- read.tree(text = "((Pan:5,Homo:5):2,Gorilla:7);") -@ - -\noindent Now let's build a small function to show the frame around -the plot with dots, and the $x$- and $y$-axes in green: - -<<>>= -foo <- function() { - col <- "green" - for (i in 1:2) - axis(i, col = col, col.ticks = col, col.axis = col, las = 1) - box(lty = "19") -} -@ - -\noindent We then plot the tree in four different ways (see below for -explanations about the options) and call for each of them the previous -small function: - -<>= -layout(matrix(1:4, 2, 2, byrow = TRUE)) -plot(mytr); foo() -plot(mytr, "c", FALSE); foo() -plot(mytr, "u"); foo() -par(xpd = TRUE) -plot(mytr, "f"); foo() -box("outer") -@ - -\noindent The last command (\code{box("outer")}) makes visible the -most outer frame of the figure showing more clearly the margins around -each tree (more on this in Sect.~\ref{sec:geom}). We note also the command \code{par(xpd - = TRUE)}: by default this parameter is \code{FALSE} so that graphical -elements (points, lines, text, \dots) outside the plotting region (i.e., in -the margins or beyond) are cut (clipped).\footnote{\code{par(xpd = TRUE)} is - used in several examples in this document mainly because of the - small size of the trees drawn here. However, in practice, this is rarely - needed.} These small figures illustrate the way trees are drawn with -\ape. This can be summarised with the following (pseudo-)algorithm: - -\bigskip\hrule height 1pt\relax -%\renewcommand{\theenumi}{\alph{enumi}} -\renewcommand{\labelenumi}{\textbf{\theenumi.}} -\begin{enumerate}\small -\item Compute the node coordinates depending on the type of tree plot, - the branch lengths, and other parameters. -\item Evaluate the space required for printing the tip labels. -\item Depending on the options, do some rotations and/or translations. -\item Set the limits of the $x$- and $y$-axes. -\item Open a graphical device (or reset it if already open) and draw - an empty plot with the limits found at the previous step. -\item Call \code{segments()} to draw the branches. -\item Call \code{text()} to draw the labels. -\end{enumerate} -\hrule height 1pt\relax\bigskip - -There are a lot of ways to control these steps. The main variations -along these steps are given below. - -\textbf{Step 1. } The option \code{type} specifies the shape -of the tree plot: five values are possible, \code{"phylogram"}, -\code{"cladogram"}, \code{"fan"}, \code{"unrooted"}, and -\code{"radial"} (the last one is not considered in this document). The -first three types are valid representations for rooted trees, while -the fourth one should be selected for unrooted trees. - -The node coordinates depend also on whether the tree has branch -lengths or not, and on the options \code{node.pos} and -\code{node.depth}. This is illustrated below using a tree with eight -tips and all branch length equal to one (these options have little -effect if the tree has only three tips): - -<<>>= -tr <- compute.brlen(stree(8, "l"), 0.1) -tr$tip.label[] <- "" -@ - -\noindent We now draw this tree using the option \code{type = - "phylogram"} (first column of plots) or \code{type = "cladogram"} -(second column) and different options: - -<>= -foo <- function() { - col <- "green" - axis(1, col = col, col.ticks = col, col.axis = col) - axis(2, col = col, col.ticks = col, col.axis = col, at = 1:Ntip(tr), las = 1) - box(lty = "19") -} -@ -<<>>= -@ - -<>= -layout(matrix(1:12, 6, 2)) -par(mar = c(2, 2, 0.3, 0)) -for (type in c("p", "c")) { - plot(tr, type); foo() - plot(tr, type, node.pos = 2); foo() - plot(tr, type, FALSE); foo() - plot(tr, type, FALSE, node.pos = 1, node.depth = 2); foo() - plot(tr, type, FALSE, node.pos = 2); foo() - plot(tr, type, FALSE, node.pos = 2, node.depth = 2); foo() -} -@ - -\noindent Some combinations of options may result in the same -tree shape as shown by the last two rows of trees. For unrooted and -circular trees, only the option \code{use.edge.length} has an effect -on the layout and/or the scales of the axes: - -<>= -foo <- function() { - col <- "green" - for (i in 1:2) axis(i, col = col, col.ticks = col, col.axis = col, las = 1) - box(lty = "19") -} -@ - -<>= -layout(matrix(1:4, 2, 2)) -par(las = 1) -plot(tr, "u"); foo() -plot(tr, "u", FALSE); foo() -plot(tr, "f"); foo() -plot(tr, "f", FALSE); foo() -@ - -\textbf{Step 2.} In the \pkg{graphics} package, text are -printed with a fixed size, which means that whether you draw a small -tree or a large tree, on a small or large device, the labels will -have the same size. However, before anything is plotted or -drawn on the device it is difficult to find the correspondence between -this size (in inches) and the user coordinates used for the node -coordinates. Therefore, the following steps are implemented to -determine the limits on the $x$-axis: - -\renewcommand{\labelenumi}{\theenumi.} -\begin{enumerate} -\item Find the width of the device in inches (see - Sect.~\ref{sec:overlay}). -\item Find the widths of all labels in inches: if at least one of them is -wider than the device, assign two thirds of the device for the -branches and one third to the tip labels. (This makes sure that by -default the tree is visible in the case there are very long tip -labels.) -\item Otherwise, the space allocated to the tip labels is increased -incrementally until all labels are visible on the device. -\end{enumerate} - -The limits on the $y$-axis are easier to determine since it depends -only on the number of branches in the tree. The limits on both axes -can be changed manually with the options \code{x.lim} and \code{y.lim} -which take one or two values: if only one value is given this will -set the rightmost or uppermost limit, respectively; if two values are given these -will set both limits on the respecive axis.\footnote{These two options differ -from their standard counterparts \code{xlim} and -\code{ylim} which always require two values.} - -By default, there is no space between the tip labels and the tips of -the terminal branches; however, text strings are printed with a -bounding box around them making sure there is actually a small -space (besides, the default font is italics making this space more -visible). The option \code{label.offset} (which is 0 by default) makes -possible to add an explicit space between them (this must be in user -coordinates). - -\textbf{Step 3.} For rooted trees, only 90\textdegree\ -rotations are supported using the option \code{direction}.\footnote{To have -full control of the tree rotation, the option `rotate' in -\LaTeX\ does the job very well.} For -unrooted (\code{type = "u"}) and circular (\code{type = "fan"}) trees, full rotation is -supported with the option \code{rotate.tree}. If these options are -used, the tip labels are not rotated. Label rotation is controlled by -other options: \code{srt}\footnote{\code{srt} is for \textit{string - rotation}, not to be confused with the function \code{str} to - print the \textit{structure} of an object.} for all trees, and -\code{lab4ut} for unrooted trees. - -\textbf{Step 4.} These can be fully controlled with the options -\code{x.lim} and \code{y.lim}. Note that the options \code{xlim} and -\code{ylim} \emph{cannot} be used from \code{plot.phylo}. - -\textbf{Step 5.} If the options \code{plot = FALSE} is used, then -steps 6 and 7 are not performed. - -\subsection{Computations}\label{sec:comput} - -As we can see from the previous section, a lot of computations are done -before a tree is plotted. Some of these computations are performed -by special functions accessible to all users, particularly the three -functions used to calculate the node coordinates. First, two functions -calculate ``node depths'' which are the coordinates of the nodes on the -$x$-axis for rooted trees: - -<<>>= -args(node.depth.edgelength) -args(node.depth) -@ - -\noindent Here, \code{phy} is an object of class \code{"phylo"}. The -first function uses edge lengths to calculate these coordinates, while -the second one calculates these coordinates proportional to the number -of tips descending from each node (if \code{method = 1}), or evenly -spaced (if \code{method = 2}). - -The third function is \code{node.height} and is used to calculate ``node -heights'', the coordinates of the nodes on the $y$-axis: - -<<>>= -args(node.height) -@ - -\noindent If \code{clado.style = TRUE}, the node heights are -calculated for a ``triangular cladogram'' (see figure -above). Otherwise, by default they are calculated to fall in the -middle of the vertical segments with the default \code{type = - "phylogram"}.\footnote{It may be good to remind here than these segments, - vertical since \code{direction = "rightwards"} is the default, are - not part of the edges of the tree.} - -For unrooted trees, the node coordinates are calculated with the -``equal angle'' algorithm described by Felsenstein -\cite{Felsenstein2004}. This is done by an internal function which -arguments are: - -<<>>= -args(unrooted.xy) -@ - -\noindent There are three other internal functions used to plot the -segments of the tree after the above calculations have been performed -(steps 1--4 in the previous section): - -<<>>= -args(phylogram.plot) -args(cladogram.plot) -args(circular.plot) -@ - -\noindent Although these four functions are not formally documented, -they are anyway exported because they are used by several packages -outside \ape. - -\section{The \code{plot.phylo} Function}\label{sec:plotphylo} - -The \code{plot} method for \code{"phylo"} objects follows quite -closely the \R\ standard practice. It has a relatively -large number of arguments: the first one (\code{x}) is mandatory -and is the tree to be drawn. It is thus not required to name it, so in -practice the tree \code{tr} can be plotted with the command -\code{plot(tr)}. All other arguments have default values: - -<<>>= -args(plot.phylo) -@ - -\noindent The second and third arguments are the two commonly -used in practice, so they can be modified without explicitly naming them like -in the above examples. Besides, \code{"cladogram"} can be abbreviated -with \code{"c"}, \code{"unrooted"} with \code{"u"}, and so on. -For the other arguments, it is better to name them if they are used or -modified (e.g., \code{lab4ut = "a"}). - -\subsection{Overview on the Options} - -The logic of this long list of options is double: the user can modify -the aspect of the tree plot, and/or use some of these options to display -some data in association with the tree. Therefore, the table below -group these options into three categories. The following two sections -show how data can be displayed in connection to the tips or to the branches of the tree. - -\begin{center} -\begin{tabular}{lll} -\toprule -Aspect of the tree & Attributes of the labels & Attributes of the edges\\ -\midrule -\code{type} & \code{show.tip.label} & \code{edge.color}\\ -\code{use.edge.length} & \code{show.node.label} & \code{edge.width}\\ -\code{node.pos} & \code{font} & \code{edge.lty}\\ -\code{x.lim} & \code{tip.color}\\ -\code{y.lim} & \code{cex}\\ -\code{direction} & \code{adj}\\ -\code{no.margin} & \code{underscore}\\ -\code{root.edge} & \code{srt}\\ -\code{rotate.tree} & \code{lab4ut}\\ -\code{open.angle} & \code{label.offset}\\ -\code{node.depth} & \code{align.tip.label}\\ -\bottomrule -\end{tabular} -\end{center} - -\subsection{Connecting Data to the Tips} - -It is common that some data are associated with the tips of a tree: -body mass, population, treatment, \dots\ The options \code{font}, -\code{tip.color}, and \code{cex} make possible to show this kind of -information by changing the font (normal, bold, italics, or -bold-italics), the colour, or the size of the tip labels, or any -combination of these. These three arguments work in the usual \R\ way: -they can a vector of any length whose values are eventually recycled if -this length is less than the number of tips. This makes possible to -change all tips if a single value is given. - -For instance, consider the small primate tree where we want to show -the geographic distributions stored in a factor: - -<<>>= -geo <- factor(c("Africa", "World", "Africa")) -@ - -\noindent We can define a color for each region and use the above -factor as a numeric index vector and pass it to \code{tip.color}: - -\begin{center} -\setkeys{Gin}{width=.5\textwidth} -<>= -(mycol <- c("blue", "red")[geo]) -plot(mytr, tip.color = mycol) -@ -\end{center} -The values must be in the same order than in the -vector of tip labels, here \code{mytr\$tip.label}. Reordering can be -done in the usual \R\ way (e.g., with \code{names} or with -\code{row.names} if the data are in a data frame). This can be -combined with another argument, for instance to show (relative) body -size: - -\begin{center} -\setkeys{Gin}{width=.5\textwidth} -<>= -par(xpd = TRUE) -plot(mytr, tip.color = mycol, cex = c(1, 1, 1.5)) -@ -\end{center} - -The function \code{def} gives another way to define the above -arguments given a vector of labels (\code{x}): - -<<>>= -args(def) -@ - -\noindent The `\code{...}' are arguments separated by commas of the -form \code{\textsl{