igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] problems in saving the igraph object as txt file


From: Gábor Csárdi
Subject: Re: [igraph] problems in saving the igraph object as txt file
Date: Tue, 31 Mar 2009 11:37:26 +0200

Anupam,

save() is not saving text files, I don't know what made you think it
would. You can try write() or write.table(), but these don't handle
lists. You can create a matrix from the result list with

motifs.mat <- do.call(rbind, motifs)

and then write it to a file with

write.table(motifs.mat, file=..., row.names=FALSE, col.names=FALSE)

Best,
G.

2009/3/31 anupam sinha <address@hidden>:
> Dear all,
>              I am using the following command-line statements to find
> subgraphs in a metabolic network and saving it in the text format.
>
>
> edgelist <- read.table("/home/path to edgelist file/met_network_yeast.txt",
> header=TRUE)
>  g <- graph.edgelist(as.matrix(edgelist),directed=TRUE)
> subg<-graph.isocreate(3,07,directed=TRUE)
>  motifs<-graph.get.subisomorphisms.vf2(g,subg)
> save(motifs,file="/home/anupam/Desktop/network_analysis/motif.txt")
>
> But the resultant text-file (motif.txt) is unreadable.Following error is
> encountered while opening it using the "gedit".
>
> gedit has not been able to detect the character coding.
> Please check that you are not trying to open a binary file
>
> Any help in this regard will appreciated.
>
>
>
> Regards,
>
> Anupam
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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