[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] using algorithms on a graph
From: |
Gabor Csardi |
Subject: |
Re: [igraph] using algorithms on a graph |
Date: |
Wed, 23 Apr 2008 13:13:16 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Daniel,
please answer to the list.
On Wed, Apr 23, 2008 at 12:00:34PM +0100, Daniel Butts wrote:
> The code I have entered is the following:
>
>
>
> > local({pkg <- select.list(sort(.packages(all.available = TRUE)))
>
> + if(nchar(pkg)) library(pkg, character.only=TRUE)})
??? Is this relevant to your problem?
> > links <- read.csv("links.csv", head=FALSE)
What is in "links.csv?"?
> > m<-cbind(links[,1],links[,2])
>
> > g<- graph( t(m) )
>
> links <- read.csv("/tmp/a.csv", head=FALSE)
> links
V1 V2
1 foo bar
2 bar foobar
3 foobar foo
> m<-cbind(links[,1],links[,2])
> graph( t(m) )
Vertices: 4
Edges: 3
Directed: TRUE
Edges:
[0] 2 -> 1
[1] 1 -> 3
[2] 3 -> 2
Works just fine for me. (But fastgreedy.community does
not work on this graph, it only works on
undirected graphs.)
Please send at least the error message, possibly
with a small example data file that reproduces the problem.
Please also send your R version, igraph version and
operating system version.
Otherwise we can't help you, i cannot even guess
without the error message.
G.
> My original file had a third column which was of no use to me.
>
>
>
> The error messages are about me not entering the command to call the routines
> correctly. If for instance I wanted to use the fast-greedy algorithm on my
> graph what would I need to enter as everything I have tried doesn’t seem to be
> right?
>
--
Csardi Gabor <address@hidden> UNIL DGM