Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

DAG visualisation #1

Open
aezarebski opened this issue Sep 6, 2018 · 0 comments
Open

DAG visualisation #1

aezarebski opened this issue Sep 6, 2018 · 0 comments

Comments

@aezarebski
Copy link

model objects in rev can output a DOT file.
the DOT package on CRAN provides functionality for writing this to a PS or SVG file.
could we please have some functionality in RevGadgets to stream line this process.

something like the following functions would be sufficient.

file_as_single_string <- function(fn) {
    readChar(fn, file.info(fn)$size)
}

dot2ps <- function(dot_file, ps_file) {
    dot_str <- file_as_single_string(dot_file)
    DOT::dot(dot_str, file=ps_file)
}

DOT does seem to require some stuff to be installed though which is a little unfortunate, but the error messages where very clear so that's nice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant