2021年5月3日星期一

vector(s) must be numeric

I tried to run functions in 'ouch' package.

I imported phylotree and csv data:

tree<-read.tree(choose.files())  data<-as.matrix(read.csv(choose.files(),row.names=1))[,1]  ouchtree<-ape2ouch(tree, scale = TRUE, branch.lengths = tree$edge.length)  

Then, I wanted to run 'brown' function:

brown(data, ouchtree)   

I received an error message:

Error in brown(data, ouchtree) :     'data' vector(s) must be numeric, with one entry per node of the tree  

I tried: data<-as.numeric(data), but it didn't work. Does anyone know how to deal with this problem? Thank you very much.

https://stackoverflow.com/questions/67378639/vectors-must-be-numeric May 04, 2021 at 12:02PM

没有评论:

发表评论