I want to publish a basic blog post like this: (Example blog post) using my R markdown files.
But I want to publish it in Wordpress (not wordpress.com).
None of the solutions worked for me. I give up. Copying and pasting code and formatting are very inefficient. I cannot align my r output properly.
Is there any other way that I did not stumble upon and possibly solve (or ease) my problem?
Thanks in advance for any response.
Have you tried "Pretty R syntax highlighter" (http://www.inside-r.org/pretty-r/tool)? It might be a nice temporary fix until you get something else working.
This code:
y <- 1:10
plot(y)
gets turned into this:
`<div style="overflow:auto;"><div class="geshifilter"><pre class="r geshifilter-R" style="font-family:monospace;">y <span style=""><-</span> <span style="color: #cc66cc;">1</span><span style="">:</span><span style="color: #cc66cc;">10</span>
<a href="http://inside-r.org/r-doc/graphics/plot"><span style="color: #003399; font-weight: bold;">plot</span></a><span style="color: #009900;">(</span>y<span style="color: #009900;">)</span></pre></div></div><p><a href="http://www.inside-r.org/pretty-r" title="Created by Pretty R at inside-R.org">Created by Pretty R at inside-R.org</a></p>`
which, when imbedded in your html, displays like this:
y <- 1:10plot(y)
Created by Pretty R at inside-R.org
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With