[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] problem with node names
From: |
Tamás Nepusz |
Subject: |
Re: [igraph] problem with node names |
Date: |
Tue, 9 Apr 2013 15:42:57 +0200 |
> 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)
There is no need to write the table into a file first; just use
graph.data.frame to construct the graph from the data frame directly.
--
T.