Creating WordPress blog posts with RMarkdown
[This article was first published on R – Nathan Green, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
R Markdown
This blog post is written as an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.
I’ve use the RWordPress package and the instructions from this blog post:
https://cognitivedatascientist.com/tag/knit2wp/
#activate the necessary libraries library(RWordPress) library(knitr) library(XMLRPC) library(RCurl) # tell RWordPress how to set the user name, password, and URL for your WordPress site. options(WordPressLogin = c(n8thangreen20 = 'PASSWORD'), WordPressURL = 'https://healthdatacounts.wordpress.com/') # tell knitr to create the html code and upload it to your WordPress site knit2wp(input = "postname.Rmd", title = "posttitle", publish = FALSE, action = "newPost")
To leave a comment for the author, please follow the link and comment on their blog: R – Nathan Green.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.