Skip to content

fix graph.formula()#6

Merged
maelle merged 1 commit intozzz-decemberfrom
maelle-patch-1
Jan 12, 2024
Merged

fix graph.formula()#6
maelle merged 1 commit intozzz-decemberfrom
maelle-patch-1

Conversation

@maelle
Copy link
Copy Markdown
Owner

@maelle maelle commented Jan 8, 2024

A bit of a hack, but it works to simply do what graph_from_literal() does.

library("igraph")
#> 
#> Attaching package: 'igraph'
#> The following objects are masked from 'package:stats':
#> 
#>     decompose, spectrum
#> The following object is masked from 'package:base':
#> 
#>     union
graph.formula(x -+ z, z -+ y, x -+ y, y -+ x) 
#> Warning: `graph.formula()` was deprecated in igraph 2.0.0.
#> ℹ Please use `graph_from_literal()` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
#> IGRAPH c33a34d DN-- 3 4 -- 
#> + attr: name (v/c)
#> + edges from c33a34d (vertex names):
#> [1] x->z x->y z->y y->x
graph_from_literal(x -+ z, z -+ y, x -+ y, y -+ x)
#> IGRAPH 5ccefd2 DN-- 3 4 -- 
#> + attr: name (v/c)
#> + edges from 5ccefd2 (vertex names):
#> [1] x->z x->y z->y y->x

Created on 2024-01-08 with reprex v2.0.2

@maelle
Copy link
Copy Markdown
Owner Author

maelle commented Jan 8, 2024

@krlmlr if this is ok, I'll integrate it to the PR in igraph/rigraph (which I'll then have to rebase)

@maelle
Copy link
Copy Markdown
Owner Author

maelle commented Jan 8, 2024

But I'd do the rebasing at the very very end since this is not an automatic change, or I'd edit the script to make this a special case in the automatic PR creation.

@krlmlr
Copy link
Copy Markdown

krlmlr commented Jan 8, 2024

I merged the better part of your big PR already, only two commits are remaining. Do we really need to rerun the script? I'd be fine with manual changes. Am I missing anything?

@krlmlr
Copy link
Copy Markdown

krlmlr commented Jan 8, 2024

Yes, this is what I mean by "inlining a function".

@maelle
Copy link
Copy Markdown
Owner Author

maelle commented Jan 9, 2024

Yes, this is what I mean by "inlining a function".

Aaaah this makes sense now, thanks. Some of them are a bit long so I'll have to think about how to best do it (later this week or next)

I realized later manual changes would be fine.

@maelle maelle merged commit f01aecd into zzz-december Jan 12, 2024
@maelle maelle deleted the maelle-patch-1 branch January 12, 2024 13:48
maelle added a commit that referenced this pull request Jan 12, 2024
maelle added a commit that referenced this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants