-4

My code is:

x<-setNames(X$x,rownames(X))
    
par(mfrow=c(1,2))
plot(tree,show.tip.label=FALSE,no.margin=TRUE)
    
par(fg="transparent")
tiplabels(pie=to.matrix(x[tree$tip.label],c("1","2")),piecol=c("blue","red"),cex=0.3)

Error in seq.default(x[i], x[i + 1], length = n) : 'to' must be a finite number

AndrewGB
  • 12,571
  • 4
  • 13
  • 38
Fabien
  • 1
  • 2
  • 1
    Please provide reproducible sample data. Without data we have no way of identifying what causes the error. I recommend reviewing [how to ask](https://stackoverflow.com/help/how-to-ask) and [how to provide a good reprex](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) to avoid future downvotes (not mine). – Maurits Evers Jun 01 '22 at 05:55

0 Answers0