Hi all,

I am trying to find which are the most distinctive clades in respect to a 
specific functional trait following the methodology proposed by Cornwell et 
al., 2014 
http://droyer.web.wesleyan.edu/Cornwell_2014_functional_distinctiveness.pdf I 
am using the code which is available in GitHub http://github.com/richfitz/ksi 
but keeping get an error:

"Using 'ks' tests

depth = 1...

Error in ksi(phylo, trait, depth = 10) : replacement has length zero

In addition: There were 50 or more warnings (use warnings() to see the first 
50)"


The error can be replicated with the following code:

library(devools)
install_github("richfitz/ksi")
x <- c('ape','ksi')
lapply(x, require, character.only = TRUE)


phylo <- rtree(1000)
phylo <- makeNodeLabel(phylo, method = "number", prefix = "")
trait <- setNames(runif(1000, min = 0, max = 1), phylo$tip.label)
ksi(phylo, trait,depth=10)

Does anyone know how I can solve this?

Thank you,

Fernanda


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to