Finding a path using the Graph package

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

Finding a path using the Graph package

kehler

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

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Finding a path using the Graph package

Robert Gentleman
Have a look at the RBGL package

(but you probably want to update your R etc to something more recent)

[hidden email] 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
>
> ______________________________________________
> [hidden email] 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
[hidden email]

______________________________________________
[hidden email] 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.