`rootoftree` <- function (nodematrix) { if(sum(nodematrix[,1]<0)>1) stop("more than two roots!") nodes<-sum((nodematrix[,1]<0)*(1:length(nodematrix[,1]))) return(nodes) }
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.