# knit2wp

From knitr v1.7
0th

Percentile

##### Knit an R Markdown document and post it to WordPress

This function is a wrapper around the RWordPress package. It compiles an R Markdown document to HTML and post the results to WordPress.

##### Usage
knit2wp(input, title = "A post from knitr", ..., shortcode = FALSE,
encoding = getOption("encoding"), publish = TRUE)
##### Arguments
input
the filename of the Rmd document
title
the post title
...
other meta information of the post, e.g. categories = c('R', 'Stats') and mt_keywords = c('knitr', 'wordpress'), etc
shortcode
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
encoding
the encoding of the input file; see file
publish
whether to publish the post immediately
##### Note

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).

##### References

http://yihui.name/knitr/demo/wordpress/

• knit2wp
##### Examples
# see the reference
Documentation reproduced from package knitr, version 1.7, License: GPL

### Community examples

Looks like there are no examples yet.