I use "igraph" package with RStudio, this package is really helpful for graphs to analyse. I've got graphs: (a (1).net, ..., a (128).net)
At first I input the graph, then I can analyse:
a (1)<-read.graph("a (1).net","format=pajek")
is.directed(a1)
Is.directed's output is binary, YES, if the edges of the graphs are directed to a node, if they are undirected then the output is NO.
'd like to for loop it to save some time:
for(x in 2:128)
{
paste('a (', x, ')', sep='')<-read.graph(paste('a (', x, ').net', sep=''),"format=pajek")
is.directed(paste('a (', x, ')', sep=''))
}
Error:
Error in match.arg(arg = arg, choices = choices, several.ok = several.ok) :
'arg' should be one of “edgelist”, “pajek”, “ncol”, “lgl”, “graphml”, “dimacs”, “graphdb”, “gml”, “dl”
How can I analyse all of my graphs with a for loop? What's wrong with my script?