kehler at mathstat.dal.ca
2008-Apr-17 21:54 UTC
[R] Finding a path using the Graph package
Hello, Does anyone know of a way of finding all the nodes that are between a pair of specified nodes in the excellent graph package (R vers 2.5.0). I have a class(graphAM) object and need to determine all possible pathways in this object. Here's an example: In the simple case of a--b--c (where -- denotes "conected to") the list of all pathways would be: ab ba abc cba cb bc. Thanks in advance, Dan
Have a look at the RBGL package (but you probably want to update your R etc to something more recent) kehler at mathstat.dal.ca wrote:> Hello, > > Does anyone know of a way of finding all the nodes that are between a pair > of specified nodes in the excellent graph package (R vers 2.5.0). > > I have a class(graphAM) object and need to determine all possible pathways > in this object. > > Here's an example: In the simple case of a--b--c (where -- denotes > "conected to") the list of all pathways would be: ab ba abc cba cb bc. > > Thanks in advance, > > Dan > > ______________________________________________ > 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. >-- Robert Gentleman, PhD Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M2-B876 PO Box 19024 Seattle, Washington 98109-1024 206-667-7700 rgentlem at fhcrc.org