0

这是我正在运行的。我想知道为什么会出现错误以及错误的含义/如何解决。获得 CDdat 的空值是否与此有关?有人有想法吗?谢谢。

library(phytools)
Loading required package: ape
Loading required package: maps

library(adephylo)
Loading required package: ade4

library(geiger)
library(nlme)
library(evomap)
library(caper)
Loading required package: MASS
Loading required package: mvtnorm

library(scales)

Attaching package: ‘scales’

The following object is masked from ‘package:geiger’:

    rescale

library(coda)
library(ggplot2); theme_set(theme_light())
library(HDInterval)

Frogtree<-read.nexus("C:/Users/WiensDell3/Desktop/TwilliamsRfiles_AdvertisementCalls/frog_contree")

Call.duration. <- read.csv("C:/Users/WiensDell3/Desktop/TwilliamsRfiles_AdvertisementCalls/Call duration .csv")

CD <- Call.duration.

mydata<-comparative.data(data= CD,phy= Frogtree, names.col= "Species")

FrogTree<- mydata$phy

mydata2 <-mydata$data

x <- mydata2$CD
BMsigma2 <- ace(x, FrogTree, method = "REML")$sigma2[1]
mvBMresults <- mvBM(x, FrogTree, BMsigma2)
tree_mvBMCD <- FrogTree; tree_mvBMCD$edge.length<-mvBMresults$rBL
CDdat<- mydata2$CD; names(CDdat <-rownames(mydata2)
+ )
NULL
Iterations <- 500000

Model_mvBMCD<-anc.Bayes(tree_mvBMCD,CDdat,ngen=Iterations)
Error in invC %*% X : requires numeric/complex matrix/vector arguments

Model_mvBMCD<-anc.Bayes(tree_mvBMCD,CDdat,ngen=Iterations)
Error in invC %*% X : requires numeric/complex matrix/vector arguments
4

0 回答 0