How to create new graph vertices from existing one with igraph in R?

2

I have the following DF in R representing a directed graph:

    >df

            from          to           timestamp duration
    1 1521695321  1066724476 2014-07-28 14:34:00     6279
    2 1523695522  3446234478 2014-02-24 13:36:00     3630
    3 7621695323  1066234477 2013-12-11 22:11:00     1045
    ...
  101 1521695324  1662354377 2014-08-02 00:49:00     5504
  102 1521695324  1066234478 2014-08-23 02:26:00     1276
  103 1521695324  3446234477 2014-05-03 04:36:00     2228

I have turned this into a graph with igraph:

g <- graph.data.frame(df)

All of the vertices have multiple edges to the other vertices they connected to. Now, I want to turn some (random) connections of some (random) existing vertices with their respective existing connections and attributes into new, synthetic vertices so, that I will get new, similar vertices to the originals. But I have no clue how to separate the candidates and append to the vertex/edges list. (My task is to find identical entities under different nodes, this is why I want to produce some similar synthetic new vertices from existing ones.)

Additionally, I have to keep track of the original vertex names in the new artificial ones to figure out later which were the original ones (the goal is to recognize the similarity to the latter ones).

Thank you for any help.

Fredrik

Posted 2020-03-30T10:10:36.627

Reputation: 687

No answers