# NOT RUN {
# }
# NOT RUN {
### Learn the cytometry network
library(sparsebn)
data(cytometryContinuous) # from the sparsebn package
cyto.data <- sparsebnData(cytometryContinuous[["data"]], type = "continuous")
cyto.learn <- estimate.dag(cyto.data)
### Inspect the output
class(cyto.learn[[1]])
print(cyto.learn[[2]])
show.parents(cyto.learn[[1]], c("raf", "mek", "plc"))
### Manipulate a particular graph
cyto.fit <- cyto.learn[[7]]
num.nodes(cyto.fit)
num.edges(cyto.fit)
show.parents(cyto.fit, c("raf", "mek", "plc"))
plot(cyto.fit)
### Use graph package instead of edgeLists
setGraphPackage("graph", coerce = TRUE) # set sparsebn to use graph package
cyto.edges <- cyto.fit$edges
degree(cyto.edges) # only available with graph package
isConnected(cyto.edges) # only available with graph package
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab