Skip to content

NA check too strickt for data frames #1905

@schochastics

Description

@schochastics

Should only error for NAs in from/to

devtools::load_all("~/git/R_packages/rigraph")
#> ℹ Loading igraph
library(igraph)
e <- data.frame(from = c(1, 2, 3, 4), to = c(2, 3, 4, 5), label = c("a", "b", NA, "d"))
graph_from_data_frame(e)
#> Error in `graph_from_data_frame()`:
#> ! Cannot create a graph object because the edge data frame contains NAs.

Created on 2025-06-30 with reprex v2.1.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions