This function is a wrapper around the RWordPress package. It compiles an R Markdown document to HTML and post the results to WordPress. Please note that RWordPress has not been updated for several years, which is not a good sign. For blogging with R, you may want to try the blogdown package instead.
knit2wp(
input,
title = "A post from knitr",
...,
envir = parent.frame(),
shortcode = FALSE,
action = c("newPost", "editPost", "newPage"),
postid,
publish = TRUE
)Filename of the Rmd document.
Title of the post.
Other meta information of the post, e.g., categories = c('R', 'Stats') and mt_keywords = c('knitr', 'wordpress'), etc.
Environment in which code chunks are to be evaluated, for
example, parent.frame(), new.env(), or
globalenv()).
A length-2 logical vector indicating whether to use the
shortcode [sourcecode lang='lang'], which can be useful to
WordPress.com users for syntax highlighting of source code and output. The
first element
applies to source code, and the second applies to text output. By default,
both are FALSE.
Whether to create a new post, update an existing post, or create a new page.
If action is editPost, the post id postid
must be specified.
Whether to publish the post immediately.
William K. Morris, Yihui Xie, and Jared Lander