
Former-commit-id: 0579e878a69b7c285ca71870e9ca5730649a2fda Former-commit-id: 7cced5b488441d87bf070a9a444317db0e048880
19 lines
316 B
R
Executable File
19 lines
316 B
R
Executable File
#!/usr/bin/env Rscript
|
|
#
|
|
|
|
require(igraph, warn.conflicts=F)
|
|
|
|
args <- commandArgs(T)
|
|
path <- if(length(args) > 0) args[1] else 'graph.dl'
|
|
|
|
g <- read.graph(path, format='dl')
|
|
|
|
cc <- clusters(g)
|
|
|
|
res <- cbind(V(g)$name, membership(cc))
|
|
|
|
write.table(res, quote=FALSE, row.names=FALSE, col.names=FALSE)
|
|
|
|
quit(save="no")
|
|
|