[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] Re: My dataset for your testing
From: |
Gabor Csardi |
Subject: |
[igraph] Re: My dataset for your testing |
Date: |
Thu, 24 Apr 2008 13:58:53 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Ok, the problem is that you have a vertex called 'NA' in your
file and when you read it using 'read.delim()' it is actually
converted to NA in the R sense.
igraph should give an error message, i'll update the code.
The workaround is to use the 'na.strings' argument to
'read.delim()':
> el <- read.delim("/tmp/hmNR.tsv", na.strings=character())
> el <- el[,1:2]
> el <- as.matrix(el)
> g <- graph.edgelist(el)
> summary(g)
Vertices: 10618
Edges: 106635
Directed: TRUE
No graph attributes.
Vertex attributes: name.
No edge attributes.
> tmp <- is.multiple(g)
G.
On Wed, Apr 23, 2008 at 05:00:17PM -0400, Gang Su wrote:
> Dear Gabor,
>
> Here's my dataset. Please keep it confidential.
> Try use edgelist to load the graph by first two columns, see whether R
> crashes;
> or use data.frame to load the graph from the first two columns, then try
> is.multiple()
> and subgraph, to see whether there's invalid id error.
>
> Gang
>
--
Csardi Gabor <address@hidden> UNIL DGM