a bug in hypergraph?
1
0
Entering edit mode
Tony Chiang ▴ 570
@tony-chiang-1769
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20080310/ a8cc99b5/attachment.pl
• 1.2k views
ADD COMMENT
0
Entering edit mode
@lilongisb-sibch-1725
Last seen 10.2 years ago
Hi, Tony, I suspect "nodes" as parameter name is in conflict w/ function "nodes"... I tried and tested some new codes... and checked in methods- Hypergraph.R Let me know what you think. Li > According to the man pages for Hypergraph-class, the following example of > a > very trivial hypergraph should still work though it does not: > > #######Code Starts######### > library(hypergraph) > namedList = vector("list") > namedList$n = "a" > id = names(namedList) > he <- mapply(function(x,y) Hyperedge(x,y), namedList, id) > >> he > $n > A Hyperedge containing 1 nodes. > >> hg = new("Hypergraph", nodes = unique(unlist(namedList)), he) > Error in get(as.character(FUN), mode = "function", envir = envir) : > variable "a" of mode "function" was not found > In addition: Warning message: > In all(goodHyperedges) : coercing argument of type 'list' to logical > ########Code Ends######### > > > If the hypergraph has more than 1 node, however, it seems to work: > > #######Code Starts######### > namedList1 = vector("list") > namedList1$n = letters[1:2] > id1 = names(namedList1) > he1 <- mapply(function(x,y) Hyperedge(x,y), namedList1, id1) > >> he1 > $n > A Hyperedge containing 2 nodes. > >> hg1 = new("Hypergraph", nodes = unique(unlist(namedList1)), he1) > Warning message: > In all(goodHyperedges) : coercing argument of type 'list' to logical > >> hg1 > An object of class "Hypergraph" > Slot "nodes": > [1] "a" "b" > > Slot "hyperedges": > $n > A Hyperedge containing 2 nodes. > ########Code Ends########## > > It would appear that this boundary case breaks something in the code; > using > traceback(), I find that: > >> traceback() > 9: get(as.character(FUN), mode = "function", envir = envir) > 8: match.fun(FUN) > 7: lapply(hyperedges, nodes) > 6: unlist(lapply(hyperedges, nodes)) > 5: hypergraph:::checkValidHyperedges(hyperedges, nodes) > 4: .local(.Object, ...) > 3: initialize(value, ...) > 2: initialize(value, ...) > 1: new("Hypergraph", nodes = unique(unlist(namedList)), he) > > The checkValidHyperedges() method does not like to call the nodes() > methods > on the hyperedge list. I am at a loss as to how to patch this problem. > > Tony > >> sessionInfo() > R version 2.7.0 Under development (unstable) (2008-02-10 r44415) > i386-apple-darwin8.11.1 > > locale: > C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] hypergraph_1.11.0 graph_1.17.14 > > loaded via a namespace (and not attached): > [1] cluster_1.11.9 tools_2.7.0 > > [[alternative HTML version deleted]] > > _______________________________________________ > 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 >
ADD COMMENT
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20080310/ 32995884/attachment.pl
ADD REPLY
0
Entering edit mode
Dear list, is it possible to use functions provided in Bioconductor (e.g. gcrma, affybatch, vns...) in C? Or calling these functions from C? Wishes Gunther
ADD REPLY
0
Entering edit mode
Gunther, You can generally have an "embedded R" called from a C program. The R manual "R-extentions" (distributed with R, or at http://cran.r-project.org/doc/manuals/R-exts.pdf) will have some of the details. The functions or data structures you refer to are in R packages, and knowing a bit of R will likely be necessary if you want to go down the C route. L. > Dear list, > > is it possible to use functions provided in Bioconductor (e.g. gcrma, affybatch, vns...) > in C? > Or calling these functions from C? > > Wishes > Gunther > > _______________________________________________ > 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 >
ADD REPLY

Login before adding your answer.

Traffic: 591 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