1% Generated by roxygen2: do not edit by hand 2% Please edit documentation in R/get_edge_df_ws.R 3\name{get_edge_df_ws} 4\alias{get_edge_df_ws} 5\title{Get the graph's edf filtered by a selection of edges} 6\usage{ 7get_edge_df_ws(graph) 8} 9\arguments{ 10\item{graph}{A graph object of class \code{dgr_graph}.} 11} 12\value{ 13an edge data frame. 14} 15\description{ 16From a graph object of class \code{dgr_graph}, get the graph's internal edge data 17frame that is filtered by the edge ID values currently active as a selection. 18} 19\details{ 20This function makes use of an active selection of edges (and the function 21ending with \verb{_ws} hints at this). 22 23Selections of edges can be performed using the following selection 24(\verb{select_*()}) functions: \code{\link[=select_edges]{select_edges()}}, \code{\link[=select_last_edges_created]{select_last_edges_created()}}, 25\code{\link[=select_edges_by_edge_id]{select_edges_by_edge_id()}}, or \code{\link[=select_edges_by_node_id]{select_edges_by_node_id()}}. 26 27Selections of edges can also be performed using the following traversal 28(\verb{trav_*()}) functions: \code{\link[=trav_out_edge]{trav_out_edge()}}, \code{\link[=trav_in_edge]{trav_in_edge()}}, 29\code{\link[=trav_both_edge]{trav_both_edge()}}, or \code{\link[=trav_reverse_edge]{trav_reverse_edge()}}. 30} 31\examples{ 32# Create a random graph using the 33# `add_gnm_graph()` function 34graph <- 35 create_graph() \%>\% 36 add_gnm_graph( 37 n = 4, 38 m = 4, 39 set_seed = 23) \%>\% 40 set_edge_attrs( 41 edge_attr = value, 42 values = c(2.5, 8.2, 4.2, 2.4)) 43 44# Select edges with ID values 45# `1` and `3` 46graph <- 47 graph \%>\% 48 select_edges_by_edge_id( 49 edges = c(1, 3)) 50 51# Get the edge data frame that's 52# limited to the rows that correspond 53# to the edge selection 54graph \%>\% get_edge_df_ws() 55 56} 57