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 <[email protected]>
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
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to