[Top][All Lists]

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

[igraph] problem with node names

From: Umberto77
Subject: [igraph] problem with node names
Date: Tue, 9 Apr 2013 15:10:46 +0200

Hi all,
I have a silly question, for me quite practical.
I have a database (vino_220510) containing exchanges among nodes and other information on a yearly time series.
I extracted a single year dataframe including 3 columms: reporting nodes, partner nodes, value of the exchange.
I used:
exp1999<-data.frame(vino_220510[vino_220510[, "year"]==1999, c("partner", "reporter", "value")])
I wanted to make a weighted directed network of it, where the values are the weights.
To do that I used:
write.table(exp1999, "exp1999.txt", row.names=FALSE)
exp1999<-read.graph("exp1999.txt", format="ncol", directed=TRUE, weights="yes", names=TRUE)
Unfortunately, "partner" and "reporter" became nodes, in fact they appear in the list "name".
get.vertex.attribute(exp1999, "name")
  [1] ""partner""  ""reporter"" ""ANT""
I tried using:
write.table(exp1999, "exp1999.txt")
but than I've got:
exp1999<-read.graph("exp1999.txt", format="ncol", directed=TRUE, weights="yes", names=TRUE)
Errore in read.graph.ncol(file, ...) : 
  At foreign.c:243 : Parse error in NCOL file, line 1 (syntax error, unexpected ALNUM, expecting NEWLINE), Parse error
How can I solve it?

Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it

Voglia di Puzzle? Su MisterCupido.com troverai i "Puzzle Clementoni High Quality" a partire da soli euro 8,30
Clicca qui

reply via email to

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