as.igraph.ResIN: Coerce a ResIN object to an igraph graph

View source: R/methods-ResIN.R

as.igraph.ResINR Documentation

Coerce a ResIN object to an igraph graph

Description

Converts a ResIN object to an igraph graph using the adjacency matrix stored in x$aux_objects$adj_matrix.

Usage

## S3 method for class 'ResIN'
as.igraph(x, mode = "undirected", weighted = TRUE, diag = FALSE, ...)

Arguments

x

A ResIN object.

mode, weighted, diag

Passed to igraph::graph_from_adjacency_matrix().

...

Additional arguments passed to igraph::graph_from_adjacency_matrix().

Value

An igraph object.

Examples

## Load the 12-item simulated Likert-type ResIN toy dataset
data(lik_data)

## Run the function:

igraph_output <-  as.igraph(ResIN(lik_data, plot_ggplot = FALSE))

class(igraph_output)

## Plot and/or investigate as you wish:

igraph::plot.igraph(igraph_output)



ResIN documentation built on March 2, 2026, 9:07 a.m.