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