[R] Search list of igraph objects to return some with certain values

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Tue Jan 5 09:23:38 CET 2021


Standard logical indexing. Write a function that returns TRUE or FALSE given an igraph object. Use sapply or Vectorize to make a logical vector as long as your list. Then use that vector to index the list with single bracket indexing.

On January 4, 2021 6:08:43 PM PST, Chris Buddenhagen <cbuddenhagen using gmail.com> wrote:
>Hi all
>
>I stochastically simulated thousands of directed igraph objects in list
>format.  I want to find and plot an example graph that meets a certain
>criteria (a link to a certain node). Does anyone have pointers on how
>to
>subset a list of igraph objects?
>
>Sincerely,
>
>
>Chris Buddenhagen
>cbuddenhagen using gmail.com
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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.

-- 
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list