'How to adapt this code for rnw file that I compile with knitr

I asked this question I get Error: invalid version specification ‘0,2’ when I use the function dm_draw() in r and I got an answer, hovewer I didn't specify that I'd like to get the visualization to be included in a .rnw file that I compile in a pdf with knitr.

I don't know how to change the function to get a visualization integrated dinamically in my pdf. Thanks in advance for the interest, hope to find a solution.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source