DiagrammeRsvg icon indicating copy to clipboard operation
DiagrammeRsvg copied to clipboard

'pre-main prep time:' in knitted output

Open HJAllen opened this issue 8 years ago • 2 comments

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('![Standards QA flowchart](stnds.qa.png){#fig:stnds.qa.flow}\n\n')

Output: pre-main prep time: 3 ms ![Standards QA flowchart](stnds.qa.png){#fig:stnds.qa.flow}

HJAllen avatar Feb 16 '17 22:02 HJAllen

just updated to development after seeing the commit but still getting 'pre-main prep time:'

HJAllen avatar Feb 16 '17 22:02 HJAllen

here is my work around:

tmp<-capture.output(rsvg_png(charToRaw(export_svg(stnds.qa.d2)),'stnds.qa.png'))

#2

HJAllen avatar Feb 17 '17 14:02 HJAllen