user567879 user567879 - 1 year ago 94
R Question

Cant generate Hasse Diagram using R

I am getting error when the following code is run

data0_0 <- hasseDiagram::generateRandomData(15, 2, 0.0)
data0_5 <- hasseDiagram::generateRandomData(15, 2, 0.5)
data1_0 <- hasseDiagram::generateRandomData(15, 2, 1.0)

The error is

> source('~/test.r')
Error in .class1(object) : could not find function "graphAM"

Answer Source

I think the cause of your error is that you don't load and attach other packages that hasseDiagram depend on. If you have those packages, library("hasseDiagram") will solve your problem. (many of them aren't on the CRAN repository but you can get newest graph, BiocGenerics and Rgraphviz package via Bioconductor 3.3).

data0_5 <- generateRandomData(15, 2, 0.5)

enter image description here