qap_setup | R Documentation |
qap_setup
).The qap_setup
function transform an individual level attributes into dyadic comparisons following a set of methods. Output can be used to compute QAP measurements using sister functions in ideanet
.
qap_setup(
net,
variables = NULL,
methods = NULL,
directed = FALSE,
additional_vars = NULL
)
net |
An |
variables |
A vector of strings naming attributes to be transformed from individual-level to dyadic-level. |
methods |
A vector of strings naming methods to be applied to the |
directed |
A logical statement identifying if the network should be treated as directed. Defaults to |
additional_vars |
A data frame containing additional individual-level variables not contained in the primary network input. Additional dataframe must contain an |
qap_setup
returns a list of elements that include:
- graph
, an updated igraph
object containing the newly constructed dyadic variables and additional individual-level variables.
- nodes
, a nodelist reflecting additional variables if included.
- edges
, a nodelist reflecting new dyadic variables.
flor <- netwrite(nodelist = florentine_nodes,
node_id = "id",
i_elements = florentine_edges$source,
j_elements = florentine_edges$target,
type = florentine_edges$type,
directed = FALSE,
net_name = "florentine_graph")
flor_setup <- qap_setup(flor$florentine_graph,
variables = c("total_degree"),
methods = c("difference"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.