[R] error with subtree()

Sarah Goslee sarah.goslee at gmail.com
Sat Sep 9 18:35:50 CEST 2017

You appear to already have something named subtree in your environment:

The following object is masked _by_ ‘.GlobalEnv’:

You could get rid of it, or you could specify that you want to use
subtree from extracat

hcs <- extracat::subtree(hc, k = 7)


On Sat, Sep 9, 2017 at 8:58 AM, Fix Ace via R-help <r-help at r-project.org> wrote:
> Dear R community,
> I would like to plot a partial hclust output, so I am looking for a subtree function that would return an tree structure I can plot.
> I ran the test code of subtree following the instruction on http://finzi.psych.upenn.edu/library/extracat/html/subtree.html
> However, an error message popped up:
> ====> library(extracat)
> Attaching package: ‘extracat’
> The following object is masked _by_ ‘.GlobalEnv’:
>     subtreehc <- hclust(dist(USArrests), "ave")> > hcs <- subtree(hc, k = 7)Error in subtree(hc, k = 7) : unused argument (k = 7)
> ===
> Can anyone help me what happened here? And what should I do with it?
> Thank you very much!
> Ace

Sarah Goslee

More information about the R-help mailing list