error with subtree()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

error with subtree()

R help mailing list-2
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

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: error with subtree()

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

The following object is masked _by_ ‘.GlobalEnv’:
    subtree


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

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

Sarah

On Sat, Sep 9, 2017 at 8:58 AM, Fix Ace via R-help <[hidden email]> 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
http://www.functionaldiversity.org

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.