save: Save rules or itemsets as a graph description.

Description Usage Arguments See Also Examples

Description

This function saves a rule sat as a graph description in different formats (e.g., GraphML, dimacs, dot).

Usage

1
saveAsGraph(x, file, type=NULL, format="graphml")

Arguments

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 write.graph in package igraph.

See Also

plot, write.graph in igraph

Examples

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")


Search within the arulesVizOld package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.