# NOT RUN {
pd <- readProfileData(system.file("samples", "glmEx.out", package="proftools"))
tmp <- tempfile()
profileCallGraph2Dot(pd, filename = tmp)
file.show(tmp)
unlink(tmp)
# }
# NOT RUN {
## If you have graphviz installed on a UNIX-like system
## then in R do:
tmp.dot <- tempfile()
tmp.pdf <- tempfile()
profileCallGraph2Dot(pd, filename = tmp.dot)
system(sprintf("dot -Tpdf -o<!-- %s %s", tmp.pdf, tmp.dot)) -->
browseURL(sprintf("file://<!-- %s", tmp.pdf)) -->
profileCallGraph2Dot(pd, filename = tmp.dot)
system(sprintf("dot -Tpdf -o<!-- %s %s", tmp.pdf, tmp.dot)) -->
browseURL(sprintf("file://<!-- %s", tmp.pdf)) -->
unlink(tmp.dot)
unlink(tmp.pdf)
# }
Run the code above in your browser using DataLab