[Top][All Lists]

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

[igraph] create graph object

From: Dieunel Derilus
Subject: [igraph] create graph object
Date: Wed, 22 Feb 2017 10:37:07 -0400

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 

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

reply via email to

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