Description Usage Arguments See Also Examples
This function saves a rule sat as a graph description in different formats (e.g., GraphML, dimacs, dot).
1 | saveAsGraph(x, file, type=NULL, format="graphml")
|
x |
an object of class "rules" or "itemsets". |
file |
file name |
type |
see type in plot with method "graph" (e.g., "itemsets", "items"). |
format |
file format (e.g., "edgelist",
"graphml", "dimacs", "gml", "dot"). See |
plot
, write.graph
in igraph
1 2 3 4 5 6 7 | data("Groceries")
rules <- apriori(Groceries, parameter=list(support=0.01, confidence=0.5))
saveAsGraph(rules, "rules.graphml")
## clean up
unlink("rules.graphml")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.