similar to: rtree() distances between tips as n by n matrix?

Displaying 20 results from an estimated 3000 matches similar to: "rtree() distances between tips as n by n matrix?"

2010 Jun 02
1
compute the associate vector of distances between leaves in a binary non-rooted tree
Hello. I'd like to compute the associate vector of distances between leaves in a binary non-rooted tree. The definition of a distance between two leaves in a binary non-rooted tree is the number of edges in the path joining the two leaves. I've tried the ape package but I'm unable to find this vector. For example, using rtree(5,rooted=F) I've obtained the following tree: $edge
2009 Sep 17
1
How to colour the tip labels in a phylogenetic tree
Hi, Using Ape, I have constructed an object of class "phylo", using the method 'nj' (lets call the object 'tree_ja'). I also have a given subset of 'tree_ja' in a vector (lets call the vector 'subspecies'). What I want to do, is construct a nj tree - plot(tree_ja) - but have the species in vector 'subspecies' shown as red at the tips of the
2009 May 11
1
Using ACE in the ape package
Having a problem running the ace command in ape. After reading my table into R and then putting the names of the rows in the table in same order as the tree I can't get ace to run and get the message Erreur dans as.matrix(x) : dims [produit 25] ne correspond pas ? la longueur de l'objet [0] This is the command I am using and each of the vectors used in the snalysis.
2013 May 17
2
peering inside functions in a package?
Let's say I would like to look inside the function corBrownian in library (ape). When I type in the function name I get the following, which is not nearly the detail that goes into this function. I am wondering how to begin cracking this function open (and others) so I can learn more about it and perhaps code my own corClass one day. Thanks. > corBrownian function (value = 1, phy, form
2007 Dec 10
1
Multiple Reponse CART Analysis
Dear R friends- I'm attempting to generate a regression tree with one gradient predictor and multiple responses, trying to test if change in size (turtle.data$Clength) acts as a single predictor of ten multiple diet taxa abundances (prey.data) Neither rpart or mvpart seem to allow me to do multiple responses. (Or if they can, I'm not using the functions properly.) > library(rpart)
2011 May 19
5
identical function names from 2 packages
Hi, If I load 2 packages that have a function with the same name, how do I tell R to run one or the other? (Instead of having R automatically use the first- or last-loaded one, whichever it is. (Which is it, by the way.)) Cheers! Nick -- ==================================================== Nicholas J. Matzke Ph.D. Candidate, Graduate Student Researcher Huelsenbeck Lab Center for
2013 Jun 03
1
Mixed effects model with a phylogenetic tree/ distance matrix as a random effect
Hi, I'm trying to build a mixed-effects model in which I'd like to include either a distance matrix or a phylogenetic tree as a random effect. The troubles I've had are that: 1. Function lmer() in package lme4 only accepts a data frame column as a random factor and not a distance matrix. 2. Function MCMCglmm() in package MCMCglmm only accepts a rooted and ultrametric phylogenetic
2011 Mar 15
1
Matrix building to remove for loops
Hello R users, I would like to reduce the number of for loops in my code. I build these matrices (50000 times). The main diagonal are 1s and the two sides along the main diagonal mirror each other as follows: i<-5 fi<-matrix(0,nrow=i,ncol=i)#floral inhibition matrix for(r in 1:i){ for(c in 1:i){ if(r==c){ fi[r,c]<-1 }else if(r<c){ fi[r,c]<-1-runif(1)^.5 }else{ fi[r,c]<-fi[c,r]
2013 Jun 16
2
extract all numbers from a string
Hi all, I have been beating my head against this problem for a bit, but I can't figure it out. I have a series of strings of variable length, and each will have one or more numbers, of varying format. E.g., I might have: tmpstr = "The first number is: 32. Another one is: 32.1. Here's a number in scientific format, 0.3523e10, and another, 0.3523e-10, and a negative,
2012 Apr 13
1
R: Colouring phylogenetic tip labels and/or edges
Hi, I have reconstructed ancestral character states on a phylogeny using MuSSE in the diversitree package and plotted the character state probabilities as pie charts on the nodes. I would, however, like to colour the character states of my extant species, i.e. the tip labels, the same colours as my pie charts, such that all species in state 1 are e.g. blue, species in state 2 red and species in
2012 Nov 13
2
Discrete trait Ornstein–Uhlenbeck in R?
Is there a package that will allow me to fit Brownian motion and Ornstein?Uhlenbeck models of evolution for discrete traits? I know that geiger and ouch have commands for fitting these models for continuous traits, but these aren't suitable for discrete trait evolution, correct? -- View this message in context:
2011 Sep 15
1
Model Selection with Phylogenetic Independent Contrasts
I'm trying to select a model under PCA using independent contrasts. Since PICs need to be forced through the origin I've been using lmorigin for the original regression, but it doesn't appear that stepAIC recognizes it. I keep receiving an error message - "Error in na.fail.default(list(Phenology = c(NA_integer_, NA_integer_, : missing values in object" I'm having
2010 Jun 17
1
plotting radial dendrograms
Dear list, I am trying to plot a radial dendrogram using the ape package, which requires my data to be of class 'phylo'. Currently I have my dendrogram stored as an object of class 'dendrogram' which was produced from an outside bit of C code, but was made into an object of class 'igraph.eigenc' and converted to a dendrogram using 'as.dendrogram()' from the igraph
2012 Feb 19
1
parse .ps files with R?
Hi, Is there a way to parse a postscript (*.ps) file with R (or perhaps with some other command-line utility)? E.g., I have a map in postscript format with lots of features, but I just want to extract the coastline and it's coordinates. Any help very much appreciated! Cheers! Nick -- ==================================================== Nicholas J. Matzke Ph.D. Candidate, Graduate
2013 Mar 21
1
PGLMM in Picante Question
Hi Guys, Using the PGLMM function in Picante it is theoretically possible to generate other models (than the 5 flagged ones indicated) by differently structuring the independent variable (Y), dependent variables (X), and covariance matrices (VV). I was wondering anyone could give me some advice (or code) for generating a model that includes the phylogenetic repulsion model (3) with the traits
2008 Mar 01
1
COMPAR.GEE Output
Hello, I am running the program COMPAR.GEE within the package APE. My dependent variable is binomial, while my independent variable is a multi-state categorical variable. The output reports an estimate for each state of the independent variable except the first one. For example, for the variable X with 3 states, the output is: intercept (estimate) X2 (estimate) X3 (estimate)
2011 Jan 28
1
Help with ape - read.GenBank()
Hi, I am trying to work with the ape package, and there is one thing I am struggling with. When calling the *read.GenBank()* function, I can get it to work with an object created like this: *>x <- c("AY395554","AY611035", ...)* *>read.GenBank(x)* However, I am trying to use the function to fetch several hundred sequences at once. So I have been testing with small
2011 Feb 03
3
how to check if an attribute exists
I am dealing with an object that sometimes has a certain attribute, sometimes doesn't. How do I check for this? "exists" doesn't work... ======================= > z=c() > z$a = c("c", "d", "f") > z $a [1] "c" "d" "f" > exists("z") [1] TRUE > exists("z$a") [1] FALSE
2003 Jul 13
1
bootstrap for hclust
dear group members, I am looking for a function that assess the stability of cluster. The result of hclust function is an hclust object which can be plot as a dendrogram. However to have confidence in the tree topology usualy bootstap is applied. I understand that I can apply bootstarp on the original data and then run hclust(dist() ) as much as I resampled but how to comapre the topologies the I
2006 Oct 17
2
plotting text with very small negative rotation hangs (PR#9301)
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig308510A16A445880F353C5C9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable to trigger the bug: plot(0:1,0:1) text(0.5,0.5,"abc",srt=3D-1e-9) this doesn't happen for positive, small srt, or for negative srt with magnitude greater than about 1e-8 (the example in