# Simulate data and compute correlation matrix
x1 <- rnorm(100)
x2 <- rnorm(100)
x3 <- x1 + x2 + rnorm(100)
d <- data.frame(x1, x2, x3)
cmat <- cor(d)
# Use gausCorScore with pcalg::ges()
pcalg::ges(gausCorScore(cmat, n = 100))
Run the code above in your browser using DataLab