Learn R Programming

cograph (version 2.0.0)

student_interactions: Student Interaction Edge List

Description

An edge list of observed interactions between 34 students during collaborative learning sessions. Each row represents one observed interaction between two students. The same pair may appear multiple times, reflecting repeated interactions.

Usage

student_interactions

Arguments

Value

A data frame with 389 rows and 2 columns:

from

Character. Anonymized two-letter student code.

to

Character. Anonymized two-letter student code.

Format

A data frame with 389 rows and 2 columns:

from

Character. Anonymized two-letter student code (e.g., "Ac", "Bd")

to

Character. Anonymized two-letter student code (e.g., "Ce", "Df")

Details

The dataset includes self-loops (34 rows where from == to), which may represent self-directed actions. These can be removed with student_interactions[student_interactions$from != student_interactions$to, ].

Because interactions repeat, this edge list naturally represents a multigraph when loaded into igraph with igraph::graph_from_data_frame().

Examples

Run this code
# Load and build network
data(student_interactions)
head(student_interactions)

# Remove self-loops and build igraph
el <- student_interactions[student_interactions$from != student_interactions$to, ]
if (requireNamespace("igraph", quietly = TRUE)) {
  g <- igraph::graph_from_data_frame(el, directed = FALSE)
  cat("Students:", igraph::vcount(g), "\n")
  cat("Interactions:", igraph::ecount(g), "\n")
}

Run the code above in your browser using DataLab