我正在尝试创建一个R Markup文档进行一些分析。
但我的代码的某个部分给出了如下错误:
“eval中的错误(expr,envir,enclos):找不到对象'False' 通话:... process_group.block - > call_block - > eval_lang - > eval - > EVAL 执行暂停“
代码实际上是独立工作但不在标记中,我试图在这里运行的代码如下所示:
suppressMessages(library(reshape2))
suppressMessages(library(ggplot2))
suppressMessages(library(gridExtra))
Customer.Code <- c("200091", "200092", "200093", "200094","200091", "200092", "200093", "200094")
variable <-c("Company.Customer.service","Company.Customer.service","Company.Customer.service","Company.Customer.service", "Competitor.Customer.service", "Competitor.Customer.service", "Competitor.Customer.service", "Competitor.Customer.service")
value <- c("5","4","5","5","3","4","4","4")
pmelt <- data.frame(Customer.Code, variable, value, stringsAsFactors=F)
pmelt$Status <- ifelse(pmelt$variable %in% c("A.E.Customer.service","A.E.Delivery","A.E.Product.Availability") , "ANE" , "Competitor")
p <- ggplot(pmelt, aes(x = variable, y=value)) + geom_boxplot(aes(colour = Status)) + geom_jitter(width = 0.2) + ggtitle("ANE Vs Competitor") + xlab("Aspects") + ylab("Ratings") + theme(axis.text.x = element_text(face="bold", color="#993333", angle=45), axis.text.y = element_text(face="bold", color="#993333"), title = element_text(face="bold", color="#993333"))
grid.arrange(arrangeGrob(p))
任何人都可以帮忙解决我在这里做错了什么
答案 0 :(得分:1)
我花了很长时间研究它,我发现修复它是为了清理knit的缓存并让下面的参数设置为false:
{r setup, include=TRUE, cache = FALSE}
希望有所帮助,我在这里看到了其他答案,但没有找到问题的核心,至少对我看到的是什么!干杯!