On Mon, Oct 15, 2012 at 1:19 PM, Sam Steingold <[email protected]> wrote:
[...]
> Error in write.graph.dot(graph, file, ...) :
>   At rinterface.c:4125 : Cannot write edgelist, File operation error
>
> IIRC, this is because write.graph does not support "~".
> Yes, I can open/close files manually, but this is quite ugly!

Indeed. Here is a bug report for it:
https://bugs.launchpad.net/igraph/+bug/1066986

The thing is this is OSX specific, because it does not have fmemopen
and open_memstream in its libc. A workaround is to prefix your file
name with "file://" and then igraph uses a temporary file to create
your file, and the final file is created via an R function that
expands '~':

g <- graph.ring(10)
write.graph(g, file="file://~/test.txt", format="edgelist")

Gabor

[...]

-- 
Gabor Csardi <[email protected]>     MTA KFKI RMKI

_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to