Knit an R Markdown document and post it to WordPress
This function is a wrapper around the
knit2wp(input, title = "A post from knitr", ..., shortcode = FALSE, encoding = getOption("encoding"), publish = TRUE)
- the filename of the Rmd document
- the post title
- other meta information of the post, e.g.
categories = c('R', 'Stats')and
mt_keywords = c('knitr', 'wordpress'), etc
- a logical vector of length 2: 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
- the encoding of the input file; see
- whether to publish the post immediately
This function will convert the encoding of the post and the title to
UTF-8 internally. If you have additional data to send to WordPress (e.g.
keywords and categories), you may have to manually convert them to the
UTF-8 encoding with the
iconv(x, to = 'UTF-8') function
(especially when using Windows).
# see the reference