I'm using the knitr package to post an .Rmd file to wordpress. First time I'm working this type of project and am having the following error/issue. Can anyone help identify the issue. Have done a number of Google searches but haven't seem similar issues. Also tried to use the newPost function for this task but that was unfruitful.
if (!require('RWordPress'))
install.packages('RWordPress', repos = 'http://www.omegahat.org/R', type = 'source')
library(RWordPress)
options(WordPressLogin = c(username = "*****"),
WordPressURL = "https://mathewanalytics.com/xmlrpc.php")
library(knitr)
knit2wp("Logistic_Regression_Document.Rmd",
title = "Evaluation Logistic Regression in R",
shortcode=TRUE, publish=FALSE )
List of 4
$ results: chr "hide"
$ message: logi FALSE
$ warning: logi FALSE
$ eval : logi FALSE
|.................................................................| 100%
ordinary text without R code
output file: Logistic_Regression_Document.md
Error in getOption("WordpressLogin", stop("need a login and password")) :
need a login and password
In addition: Warning messages:
1: In Ops.factor(1, obs) : '-' not meaningful for factors
2: In Ops.factor(1, obs) : '-' not meaningful for factors
3: In Ops.factor(1, y) : '-' not meaningful for factors
I had this problem too, and it turned out to be a problem with the variable names.
You are setting: (note the capital P)
WordPressLogin = c(username = "*****")
But the function is throwing this error:
Error in getOption("WordpressLogin", stop("need a login and password"))
So if you set the right variables:
options(WordpressLogin = c(username = "*****"),
WordpressURL = "https://mathewanalytics.com/xmlrpc.php")
Then you should be ok.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With