我正在尝试创建 R 标记文档以进行一些分析。
但我的代码的特定部分给了我一个错误,如下所示:
“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", …Run Code Online (Sandbox Code Playgroud) r ×1