为了经常性的在博客中发表一些内容,我需要一个快速、简单的方法。更重要的是,这个方法还必须免费!
我在网上搜索了一下,发现一个R包 RWordPress。该包能帮助使用者将内容发表到WordPress(需要knitr包)。
下面是我用的代码
- #Loading required packages
- library(knitr)
- library(RWordPress)
- #Defining login options
- options(WordPressLogin = c(your_username = “your_password”),
- WordpressURL = ‘https://yourblog.wordpress.com/xmlrpc.php’
- #Import the Rmd file and update it to WordPress
- knit2wp(‘post_blog.Rmd’,
- title = ‘title_here’,
- publish = FALSE, #not to be published you can later edit it in WordPress
- action = “newPost”)


雷达卡




京公网安备 11010802022788号







