powered by
This function saves a rule sat as a graph description in different formats (e.g., GraphML, dimacs, dot).
saveAsGraph(x, file, type="items", format="graphml")
an object of class "rules" or "itemsets".
file name
see type in plot with method "graph" (e.g., "itemsets", "items").
file format (e.g., "edgelist", "graphml", "dimacs", "gml", "dot"). See write.graph in package igraph.
write.graph
plot, write.graph in igraph
plot
# NOT RUN { data("Groceries") rules <- apriori(Groceries, parameter=list(support=0.01, confidence=0.5)) saveAsGraph(rules, "rules.graphml") ## clean up unlink("rules.graphml") # }
Run the code above in your browser using DataLab