rigraph icon indicating copy to clipboard operation
rigraph copied to clipboard

`disjoint_union()` and vertex attributes

Open krlmlr opened this issue 1 year ago • 2 comments

Needs same treatment as #761.

options(conflicts.policy = list(warn = FALSE))
library(igraph)

# create two graphs
g1 <- make_graph(~ B - -C, C - -D)
g2 <- make_graph(~ A - -G, E - -F)

# add an edge attribute of class POSIXct to each graph
g1 <- set_vertex_attr(g1, "date", value = as.POSIXct(c("2021-01-01 01:01:01", "2022-02-02 02:02:02", "2023-03-03 03:03:03")))
g2 <- set_vertex_attr(g2, "date", value = as.POSIXct(c("2021-03-03 03:03:03", "2022-04-04 04:04:04", "2023-05-05 05:05:05", "2024-06-06 06:06:06")))

# create the union of the two graphs
u <- disjoint_union(g1, g2)

# now print the structure of g1, g2, and u
vertex_attr(u, "date")
#> [1] 1609459261 1643763722 1677808983 1614736983 1649037844 1683255905 1717646766

Created on 2024-12-20 with reprex v2.1.1

CC @bockthom @maxloeffler.

krlmlr avatar Dec 30 '24 19:12 krlmlr

I'd suggest to rename this issue, as it actually is about vertex attributes, not edge attributes (edge attributes have been addressed already in #761 and #1587).

bockthom avatar Dec 30 '24 23:12 bockthom

Good catch, thanks!

krlmlr avatar Dec 31 '24 08:12 krlmlr

Are there any news on fixing this inconsistency?

Should be easy to fix, as the changes of PR https://github.com/igraph/rigraph/pull/1375 carried out in what now appear to be lines 271-285 of R/operators.R regarding edge attributes just need to be applied to similar code for vertex attributes in the same file a few lines above (now lines 246-254), which had been missed in PR https://github.com/igraph/rigraph/pull/1375.

bockthom avatar Jul 03 '25 04:07 bockthom

Claude Assistant Failure 🚨

I encountered an error while processing your request. This could be due to:

  • API Rate Limits: Too many requests in a short period
  • Timeout: The task took longer than expected to complete
  • Resource Constraints: The task required more resources than available
  • Configuration Issues: There may be an issue with the Claude configuration
  • External Dependencies: Required services or APIs may be unavailable

What you can try:

  • Wait a few minutes and try again with the same trigger phrase
  • Break down complex requests into smaller, more specific tasks
  • Check if there are any ongoing issues with GitHub Actions or the Anthropic API

Job Details:

  • Workflow Run: 16041259435
  • Triggered by: @bockthom
  • Failure occurred at: 2025-07-03T04:01:48.052Z

If this issue persists, please report it at https://github.com/anthropics/claude-code-action/issues

github-actions[bot] avatar Jul 03 '25 04:07 github-actions[bot]

just needs merging https://github.com/igraph/rigraph/pull/1909

schochastics avatar Jul 03 '25 08:07 schochastics