igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] create graph object


From: Tamas Nepusz
Subject: Re: [igraph] create graph object
Date: Wed, 22 Feb 2017 21:30:29 +0100

Hi,

You need to create a graph from the data frame first using graph_from_data_frame.

T.

On Wed, Feb 22, 2017 at 3:37 PM, Dieunel Derilus <address@hidden> wrote:
Dear  Igraph develpppers and memebers

 I am facing some difficulties to remove redundancy from a    network using  'simplify' in 'igraph' package. My network is in a table file, firstly my data frame as an object and secondly I run the command line: simplify(g, remove.multiple = TRUE), and have an output error saying  created object is   not  an igraph object . My question is how I can convert a text file  to a graph object  to avoid this error message ?
 
Here is   my input and the output in R :
> g <- read.table("data.txt")
> g
  V1 V2
1  a  b
2  b  a
3  d  o
4  d  l
> g <- read.table("data.txt")
> simplify(g, remove.multiple = TRUE)
Error in simplify(g, remove.multiple = TRUE) : Not a graph object


Thanks in advance 

DD
--------------------------
Derilus Dieunel
Graduate Student
Department of Environmental Sciences
University of Puerto Rico, Río Piedras



_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



reply via email to

[Prev in Thread] Current Thread [Next in Thread]