I have 4000 records of volume in trees plantation. I need to calculate the Moran's I to the whole plantation. I use ape library because spdep is said to be slower.
My code is this:
# Modified from…
I have built a phylogenetic tree for a protein family that can be split into different groups, classifying each one by its type of receptor or type of response. The nodes in the tree are labeled as the type of receptor.
In the phylogenetic tree I…
I know how to use the PCA results to draw the circle, but failed to draw the x.lab and the y.lab based on the plotting results from s.class.
How to make a plot as I posted here?
I would like to ask more about this.
How to make the points bigger…
When working with phylogenetic tree data in R (specifically when working with "phylo" or "phylo4" objects) it would be useful to normalize branch lengths so that certain taxa (the ones that evolve faster) do not contribute a disproportionate amount…
I've imported a ClustalW2 tree in R using the ape function and read.tree function of the ape package. I estimate molecular ages using the chronopl function, resulting in a ultrametric, binary tree. From which I want to create a R build in dendrogram…
I'm trying to arrange a phylogenetic tree onto a graph showing physiological data for a set of related organisms. Something like the picture below. This was put together in powerpoint from 2 separate graphs. I guess it gets the job done, but I…
I'm trying to use haploNet function of {pegas} to plot a haplotype network, but i`m having trouble putting equal haplotypes from different populations in a same piechart. I can build a haplotype net with the following script:
x <-…
I have several phylogenetic trees imported into R from Newick format. I am using the ape package to plot the trees with plot.phylo command. I would like to be able to change the font family (not only the size, which I can do with cex, or color with…
I am trying to create a phylo correlogram based on my data using phyloCorrelogram from the phylosignal package in order to test for presence of a phylogenetic signal. My data is in the so-called phylo4d format and is called tree.
Now, when I run…
I'm new to programming in R and trying to do a very specific task.
I have a fasta sequence of n samples, which I read in ape:
library(ape)
matrix <- read.dna(myfasta, format="fasta", as.character=TRUE)
This created a matrix, like so:
| | V1 |…
I am trying to visualize the results of a phylogenetic least squares regression using ape and phytools. Specifically, I have been trying to create a regression equation for predictive purposes, and I am looking at how much phylogenetic signal…
I would like to generated unrooted neighbour joining trees from input haplotype data, and then colour the branches of the trees based on a variable.
I am using the packages Ape and ggtree.
The haplotypes and co-variables (metadata) are on two…
I'm new to phylogenetic analyses, and I'm using the ape library to analyse neuroanatomical traits of 34 primates from 28 different species. I used 10ktrees to obtain a consensus phylogenetic tree (with 28 tips). However, I can't combine the…
I have performed statistical tests on lots of genera that are hierarchically structured with a tree, so I have a p-value for each of the genus in the tree.
I want to visualize both the tree and the p-value in a panel plot, as it's possible to do…