r - 条形图代码有效,但在尝试编织到 flexdashboard 或 rnotebook 时会导致错误
问题描述
这是我尝试编织到 flexdashboard/rnotebook 时收到的错误:
match.arg(method) 中的错误:'arg' 必须为 NULL 或字符向量调用:... withVisible -> eval -> ggplot -> filter -> match.arg 执行停止。
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
```{r setup, include=FALSE}
library("flexdashboard")
library("ggplot2")
load("K:/Research/Jamie/R/#6/stl7172.Rda")```
Column {data-width=333}
-----------------------------------------------------------------------
### Chart A
```{r}
ggplot(data= filter(stl7172, SEX == "Male" | SEX == "Female", stl7172$MET2013 == "STL_MSA"),
aes(x = SEX, y = INCTOT, fill = RACE)) +
geom_bar(stat = "summary", position= position_dodge(), width = .9) +
labs(
title="Mean Income Level for Workers in the Leisure & Hospitality Industry",
subtitle= "(St. Louis MSA, by race and sex)",
caption = "(Source: IPUMS)")
解决方案
推荐阅读
- mongodb - 如何在 Spring Data mongo 中查询生日
- vb.net - 如何在一个 MsgBox() 中显示多条消息?[VB.NET]
- css - 如何使用 CSS 将填充应用于包装文本?
- python - Memcached 自动反映内置用户模型的变化,如何?
- python-3.x - 在python中读取十六进制文件(.dat)时如何识别文件中的当前位置?
- c# - UWP listview 多个 ItemContainerStyle
- jquery - initAutocomplete 不是一个函数(在本地机器上工作,但在实时服务器中部署时显示问题)
- scala - 声明一个在 Scala 中不返回的函数
- javascript - 如何在jquery的文本中添加css请给我参考
- android - 在 submitList 之后没有获得 PagedListAdapter 的 itemCount