fineRADstructure icon indicating copy to clipboard operation
fineRADstructure copied to clipboard

an error in R code to draw the plot

Open Yyeserin opened this issue 3 years ago • 3 comments

Hi Milan,

I could run the software. Now using the scripts from this page to draw a plot in R: https://github.com/millanek/fineRADstructure/blob/master/fineRADstructurePlot.R

However I got stuck. The code gives error at this point:

_> tdend<-myapetodend(ttree,factor=1) is.binary.tree() is deprecated; using is.binary() instead.

is.binary.tree() will be removed soon: see ?is.binary and update your code._

Apparently it is related to ape version, and I need to update the code. But which code should I update? I can't see any "is.binary" in R code supplied. A little tip would help a lot!

Best, Yeserin.

Yyeserin avatar Aug 19 '22 08:08 Yyeserin

**** ISSSUE RESOLVED ****

I uninstalled and reinstalled R, R studio, and XQuartz.


I'm also having the same problem, and when I continue on with is.binary() I get the following error. I'm not sure if they are related, but any help resolving the error is appreciated!

>plotFinestructure(tmpmat,dimnames(tmpmat)[[1]],dend=tdend,cols=some.colorsEnd,cex.axis=1.1,edgePar=list(p.lwd=0,t.srt=90,t.off=-0.1,t.cex=1.2))

Error in if (axes) { : argument is not interpretable as logical
In addition: Warning message:
In if (axes) { :

Error in if (axes) { : argument is not interpretable as logical
3.
plot.default(c(0, 1), c(0, 1), type = "n", axes = F, xlab = "", 
ylab = "")
2.
plot(c(0, 1), c(0, 1), type = "n", axes = F, xlab = "", ylab = "") at FinestructureLibrary.R#1494
1.
plotFinestructure(tmpmat, dimnames(tmpmat)[[1]], dend = tdend, 
cols = some.colorsEnd, cex.axis = 1.1, edgePar = list(p.lwd = 0, 
t.srt = 90, t.off = -0.1, t.cex = 1.2)) 

Best, Nichelle

NMVanTassel avatar Sep 05 '22 19:09 NMVanTassel

Do you happen to know why it worked to uninstall and reinstall everything? I also just hit this error but I am really hoping I don't have to uninstall and reinstall everything!

JHHartman avatar May 10 '23 19:05 JHHartman

I'm not sure what exactly it was, I was just happy it worked! I do still get the binary message, but the code still works fine and makes all the plots.

is.binary.tree() is deprecated; using is.binary() instead.

is.binary.tree() will be removed soon: see ?is.binary and update your code.

NMVanTassel avatar May 10 '23 19:05 NMVanTassel