Closed liamxg closed 1 year ago
@ArtPoon
Hi @liamxg, you should be able to retrieve the minimum value from the data objects used in the R script. Which script are you using, specifically?
Okay, it looks like you've just copied the example in the README
document, so I'll assume you are running the following code:
cutoffs <- sapply(param.list, function(x) x$branch.thresh)
par(mar=c(5,5,1,1))
plot(cutoffs, delta.AIC, type='l', col='cadetblue', lwd=2)
abline(h=0, lty=2)
In which case, you should be able to retrieve and display the minimum as follows:
cutoffs <- sapply(param.list, function(x) x$branch.thresh)
min.cutoff <- cutoffs[which.min(delta.AIC)]
par(mar=c(5,5,1,1))
plot(cutoffs, delta.AIC, type='l', col='cadetblue', lwd=2)
abline(h=0, lty=2)
text(x=min.cutoff, y=min(delta.AIC), label=min.cutoff, cex=0.8, adj=0)
@ArtPoon thanks, I will try that.