load_graph {Diderot} | R Documentation |
This function loads a citation graph saved on the filesystem.
load_graph(filename)
filename |
File to load |
Returns a graph object.
This function basically supports only graph previously saved with Diderot's save_graph. However, as the file is actually a graphml file handled by igraph, advanced users may use this function on appropriate graphs created elsewhere, as long as they respect Diderot's structure (presence of a "Corpus"" field, etc).
Christian Vincenot (christian@vincenot.biz)
labels<-c("Corpus1","Corpus2")
# Build a bibliographical dataset from Scopus exports
db<-create_bibliography(corpora_files=c(tempfi1,tempfi2),
labels=labels, keywords=NA)
# Build graph
gr<-build_graph(db=db,small.year.mismatch=TRUE, attrs=c("Corpus","Year","Authors"), nb.cores=1)
## Not run:
save_graph(gr, "Saved.graphml")
# Load saved graph
gr<-load_graph("Saved.graphml")
## End(Not run)