On 26/11/14 08:53, Michael Mason wrote:> Here you are. I expect most folks won't get the error. > > N = 100; M = 1000 > mat = matrix(1:(N*M) + rnorm(N*M,0,.5),N,M) > h = hclust(as.dist(1-cor(mat))) > plot(h) > > Error in .Internal(dend.window(n, merge, height2, hang, labels, ...)) : > there is no .Internal function 'dend.window' > > > > Thanks again > > > On 11/25/14 11:29 AM, "Rolf Turner" <r.turner at auckland.ac.nz> wrote: > >> >> >> Reproducible example??? >> >> (I know from noddink about hclust, but I tried the example from the help >> page and it plotted without any problem.) >> >> cheers, >> >> Rolf Turner >> >> On 26/11/14 06:13, Michael Mason wrote: >>> Hello fellow R users, >>> >>> I have recently updated to R 3.1.2. When trying to plot an hclust >>> object to generate the dendrogram I get the following error: >>> >>> Error in .Internal(dend.window(n, merge, height2, hang, labels, ...)) : >>> there is no .Internal function 'dend.window' >>> >>> >>> I am indeed using R3.1.2 but my understanding is that the .Internal API >>> to the C code is no longer used. I have tried detaching the stats >>> package and restarting R to no avail. >>> I would love any help from any wiser guRus.Please keep communications on-list; there are others on the list far more likely to be able to help you than I. I am cc-ing this reply to the list. For what it's worth, I can run your example without error. As to how to track down what is going wrong on your system, I'm afraid I have no idea. Someone on the list may have some thoughts. cheers, Rolf Turner -- Rolf Turner Technical Editor ANZJS
You probably have a local copy of an old version of plot.hclust or plot.dendrogram in your global environmenet or another package that masks the one in package:stats. E.g., I fired up R-2.14.2 and copied those 2 plot methods to .GlobalEnv and then saved by workspace when quitting R. I then fired up R-3.1.1, which loads the workspace saved by the older version of R. I get:> objects()[1] "plot.dendrogram" "plot.hclust"> plot(hclust(dist(c(2,3,5,7,11,13,17,19))))Error in .Internal(dend.window(n, merge, height, hang, labels, ...)) : there is no .Internal function 'dend.window'> traceback()2: plot.hclust(hclust(dist(c(2, 3, 5, 7, 11, 13, 17, 19)))) 1: plot(hclust(dist(c(2, 3, 5, 7, 11, 13, 17, 19)))) Note how calling traceback() after an error gives more information about the source of the error. To fix this, get rid of the .RData file that is being loaded when R starts. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Nov 25, 2014 at 12:18 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:> On 26/11/14 08:53, Michael Mason wrote: > >> Here you are. I expect most folks won't get the error. >> >> N = 100; M = 1000 >> mat = matrix(1:(N*M) + rnorm(N*M,0,.5),N,M) >> h = hclust(as.dist(1-cor(mat))) >> plot(h) >> >> Error in .Internal(dend.window(n, merge, height2, hang, labels, ...)) : >> there is no .Internal function 'dend.window' >> >> >> >> Thanks again >> >> >> On 11/25/14 11:29 AM, "Rolf Turner" <r.turner at auckland.ac.nz> wrote: >> >> >>> >>> Reproducible example??? >>> >>> (I know from noddink about hclust, but I tried the example from the help >>> page and it plotted without any problem.) >>> >>> cheers, >>> >>> Rolf Turner >>> >>> On 26/11/14 06:13, Michael Mason wrote: >>> >>>> Hello fellow R users, >>>> >>>> I have recently updated to R 3.1.2. When trying to plot an hclust >>>> object to generate the dendrogram I get the following error: >>>> >>>> Error in .Internal(dend.window(n, merge, height2, hang, labels, ...)) : >>>> there is no .Internal function 'dend.window' >>>> >>>> >>>> I am indeed using R3.1.2 but my understanding is that the .Internal API >>>> to the C code is no longer used. I have tried detaching the stats >>>> package and restarting R to no avail. >>>> I would love any help from any wiser guRus. >>>> >>> > Please keep communications on-list; there are others on the list far more > likely to be able to help you than I. I am cc-ing this reply to the list. > > For what it's worth, I can run your example without error. > > As to how to track down what is going wrong on your system, I'm afraid I > have no idea. Someone on the list may have some thoughts. > > cheers, > > Rolf Turner > > -- > Rolf Turner > Technical Editor ANZJS > > ______________________________________________ > R-help at 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. >[[alternative HTML version deleted]]
Thanks! That worked From: William Dunlap <wdunlap at tibco.com<mailto:wdunlap at tibco.com>> Date: Tuesday, November 25, 2014 12:53 PM To: Rolf Turner <r.turner at auckland.ac.nz<mailto:r.turner at auckland.ac.nz>> Cc: Michael Mason <mmason at benaroyaresearch.org<mailto:mmason at benaroyaresearch.org>>, R help <R-help at r-project.org<mailto:R-help at r-project.org>> Subject: Re: [R] plot.hclust point to older version You probably have a local copy of an old version of plot.hclust or plot.dendrogram in your global environmenet or another package that masks the one in package:stats. E.g., I fired up R-2.14.2 and copied those 2 plot methods to .GlobalEnv and then saved by workspace when quitting R. I then fired up R-3.1.1, which loads the workspace saved by the older version of R. I get:> objects()[1] "plot.dendrogram" "plot.hclust"> plot(hclust(dist(c(2,3,5,7,11,13,17,19))))Error in .Internal(dend.window(n, merge, height, hang, labels, ...)) : there is no .Internal function 'dend.window'> traceback()2: plot.hclust(hclust(dist(c(2, 3, 5, 7, 11, 13, 17, 19)))) 1: plot(hclust(dist(c(2, 3, 5, 7, 11, 13, 17, 19)))) Note how calling traceback() after an error gives more information about the source of the error. To fix this, get rid of the .RData file that is being loaded when R starts. Bill Dunlap TIBCO Software wdunlap tibco.com<http://tibco.com> On Tue, Nov 25, 2014 at 12:18 PM, Rolf Turner <r.turner at auckland.ac.nz<mailto:r.turner at auckland.ac.nz>> wrote: On 26/11/14 08:53, Michael Mason wrote: Here you are. I expect most folks won't get the error. N = 100; M = 1000 mat = matrix(1:(N*M) + rnorm(N*M,0,.5),N,M) h = hclust(as.dist(1-cor(mat))) plot(h) Error in .Internal(dend.window(n, merge, height2, hang, labels, ...)) : there is no .Internal function 'dend.window' Thanks again On 11/25/14 11:29 AM, "Rolf Turner" <r.turner at auckland.ac.nz<mailto:r.turner at auckland.ac.nz>> wrote: Reproducible example??? (I know from noddink about hclust, but I tried the example from the help page and it plotted without any problem.) cheers, Rolf Turner On 26/11/14 06:13, Michael Mason wrote: Hello fellow R users, I have recently updated to R 3.1.2. When trying to plot an hclust object to generate the dendrogram I get the following error: Error in .Internal(dend.window(n, merge, height2, hang, labels, ...)) : there is no .Internal function 'dend.window' I am indeed using R3.1.2 but my understanding is that the .Internal API to the C code is no longer used. I have tried detaching the stats package and restarting R to no avail. I would love any help from any wiser guRus. Please keep communications on-list; there are others on the list far more likely to be able to help you than I. I am cc-ing this reply to the list. For what it's worth, I can run your example without error. As to how to track down what is going wrong on your system, I'm afraid I have no idea. Someone on the list may have some thoughts. cheers, Rolf Turner -- Rolf Turner Technical Editor ANZJS ______________________________________________ R-help at r-project.org<mailto:R-help at 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. ________________________________ --CONFIDENTIALITY NOTICE--: The information contained in this email is intended for the exclusive use of the addressee and may contain confidential information. If you are not the intended recipient, you are hereby notified that any form of dissemination of this communication is strictly prohibited. www.benaroyaresearch.org [[alternative HTML version deleted]]