DiagrammeRsvg
DiagrammeRsvg copied to clipboard
'pre-main prep time:' in knitted output
using Diagramme and DiagrammeRsvg to output a flow chart in Rmarkdown to pdf. seems I have it working but the export_svg also outputs "pre-main prep time: 3 ms" which is captured in the knit. How can this be suppressed?
stnds.qa.d<-"digraph {
# Nodes
node [shape = diamond]
cvF [label = 'CV Fail > 0']
cvF0 [label = 'Standard 0\n Fail']
cvF01 [label ='Supplement\n Standard 0\nwith LRBs']
cvF15 [label = 'CV <= 15%']
calc [shape = rectangle, label = 'Calculate Standard Curve']
cvF1 [label = 'CV Failures > 1']
outlier [label = 'Test Standard\nReplicates\nas outlier']
# Edges
edge [color = black,
arrowhead = vee]
rankdir = TD
cvF->calc [label = 'No']
cvF->cvF0 [label = 'Yes']
cvF0->cvF1 [label = 'No']
cvF0->cvF01 [label = 'Yes']
cvF01->cvF1 [label = 'CV <= 10%']
cvF1->cvF15 [label = 'No']
cvF1->outlier [label = 'Yes']
cvF15->calc [label = 'Yes']
cvF15->outlier [label = 'No']
outlier->calc[label = 'Discard\nOutliers']
{rank=same; cvF; calc}
{rank=same; cvF0; cvF1}
{rank=same; cvF1; cvF15}
}"
stnds.qa.d2 <- grViz(stnds.qa.d)
rsvg_png(charToRaw(export_svg(stnds.qa.d2)),'stnds.qa.png')
cat('{#fig:stnds.qa.flow}\n\n')
Output:
pre-main prep time: 3 ms {#fig:stnds.qa.flow}
just updated to development after seeing the commit but still getting 'pre-main prep time:'
here is my work around:
tmp<-capture.output(rsvg_png(charToRaw(export_svg(stnds.qa.d2)),'stnds.qa.png'))
#2