data(gmD)
str(gmD, max=1)
if(require("Rgraphviz"))
plot(gmD$ g, main = "gmD $ g --- the DAG of the gmD (10'000 x 5 discrete data)")
## >>> 1 --> 3 <-- 2 --> 4 --> 5
str(gmD$x)
## The number of unique values of each variable:
sapply(gmD$x, function(v) nlevels(as.factor(v)))
## X1 X2 X3 X4 X5
## 3 2 3 4 2
lapply(gmD$x, table) ## the (marginal) empirical distributions
## $X1
## 0 1 2
## 1933 3059 5008
##
## $X2
## 0 1
## 8008 1992
##
## $X3
## .....
Run the code above in your browser using DataLab