Hi All,

I am new to R, so please excuse the simplicity of the question.  I am trying to 
remove nodes from a dendrogram - specifically nodes that have less than 3 
members.  I am trying to create a function to do so, but I am not sure how to 
reference the node inside of the function.  Here is the code:

  rem.nodes <<- function(n) {
      if(!is.leaf(n) & attr(n, "members")<3) {

      REMOVE N ?? }    }

reduced.dend <- dendrapply(dend1, rem.nodes)

I just don't know how to reference the specific node element in the dendrogram 
list.  Any ideas are appreciated!


Jesse


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to