hcluster crashes R environment
1
0
Entering edit mode
@henrique-proenca-2762
Last seen 9.7 years ago
Hello, I am trying to apply the function "hcluster" (contained within the "amap" package) to data matrix with no variability between its columns. The example I am using is: x <- data.frame(col1=c(20,30,45,7,6,5,4,3),col2=c(20,30,45,7,6,5,4,3), stringsAsFactors=FALSE) hcluster(x, method="correlation", link = "complete") In this case, the error generated is fatal and the application (R environment) stops completely (crashes) without any control of the error. I do understand it in the way one can not apply the correlation to a vector with no variability, but in the following case: x <- data.frame(col1=c(20,30,45,7,6,5,4,3),col2=c(20,30,45,7,6,5,7,7), stringsAsFactors=FALSE) hcluster(x, method="correlation", link = "complete") There are rows without variability, and others (last two rows) containing some. When I use this example, the R environment does not crash. So, my question is: Why the "hcluster" funcions generates this fatal error when no variability is found in all the matrix rows ? Thanks in advance -- Regards Henrique Proen?a
• 1.1k views
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 7 weeks ago
United States
> Hello, > > I am trying to apply the function "hcluster" (contained within the > "amap" package) to data matrix with no variability between its columns. > The example I am using is: > > > x <- data.frame(col1=c(20,30,45,7,6,5,4,3),col2=c(20,30,45,7,6,5,4,3), > stringsAsFactors=FALSE) > hcluster(x, method="correlation", link = "complete") > > > In this case, the error generated is fatal and the application (R > environment) stops completely (crashes) without any control of the > error. I do understand it in the way one can not apply the correlation > to a vector with no variability, but in the following case: I can confirm this on R 2.7.0 for macosx; you did not tell us the platform you are using; please read the posting guide and supply sessionInfo() for such queries. amap is contributed by Antoine Lucas, as noted on the CRAN distribution point, please notify him. Clearly there is inadequate error management through his call to .C. (Developers are encouraged to use .Call instead.) > > x <- data.frame(col1=c(20,30,45,7,6,5,4,3),col2=c(20,30,45,7,6,5,7,7), > stringsAsFactors=FALSE) > hcluster(x, method="correlation", link = "complete") > > There are rows without variability, and others (last two rows) > containing some. When I use this example, the R environment does not > crash. So, my question is: Why the "hcluster" funcions generates this > fatal error when no variability is found in all the matrix rows ? > > > Thanks in advance > > -- > Regards > Henrique Proen?a > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > -------------- next part -------------- The information transmitted in this electronic communica...{{dropped:18}}
ADD COMMENT
0
Entering edit mode
Hello, Thanks for your quickly answer, and for your advice. The info of my system is: R version 2.7.0 (2008-04-22) i386-pc-mingw32 attached base packages: [1] tools stats graphics grDevices utils datasets methods [8] base other attached packages: [1] amap_0.8-2 Biobase_2.0.1 Regards Henrique Proen?a Vincent Carey 525-2265 wrote: >> Hello, >> >> I am trying to apply the function "hcluster" (contained within the >> "amap" package) to data matrix with no variability between its columns. >> The example I am using is: >> >> >> x <- data.frame(col1=c(20,30,45,7,6,5,4,3),col2=c(20,30,45,7,6,5,4,3), >> stringsAsFactors=FALSE) >> hcluster(x, method="correlation", link = "complete") >> >> >> In this case, the error generated is fatal and the application (R >> environment) stops completely (crashes) without any control of the >> error. I do understand it in the way one can not apply the correlation >> to a vector with no variability, but in the following case: > > I can confirm this on R 2.7.0 for macosx; you did not tell us the platform > you are using; please read the posting guide and supply sessionInfo() > for such queries. > > amap is contributed by Antoine Lucas, as noted on the CRAN distribution > point, please notify him. Clearly there is inadequate error management > through his call to .C. (Developers are encouraged to use .Call instead.) > >> x <- data.frame(col1=c(20,30,45,7,6,5,4,3),col2=c(20,30,45,7,6,5,7,7), >> stringsAsFactors=FALSE) >> hcluster(x, method="correlation", link = "complete") >> >> There are rows without variability, and others (last two rows) >> containing some. When I use this example, the R environment does not >> crash. So, my question is: Why the "hcluster" funcions generates this >> fatal error when no variability is found in all the matrix rows ? >> >> >> Thanks in advance >> >> -- >> Regards >> Henrique Proen?a >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> >> ------------------------------------------------------------------- ----- >> >> >> The information transmitted in this electronic communication is intended only >> for the person or entity to whom it is addressed and may contain confidential >> and/or privileged material. Any review, retransmission, dissemination or other >> use of or taking of any action in reliance upon this information by persons or >> entities other than the intended recipient is prohibited. If you received this >> information in error, please contact the Compliance HelpLine at 800-856-1983 and >> properly dispose of this information. >> >>
ADD REPLY

Login before adding your answer.

Traffic: 567 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6