当我filter()或者select()具有空格的列名称通常在dplyr中使用反引号定义时,我的内联代码块会中断.
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(dplyr)
library(knitr)
library(lazyeval)
df <- structure(list(1:3, 2:4), .Names = c("a", "b"), row.names = c(NA, -3L), class = "data.frame")
df <- df %>% select(`a a`=a, `b b`=b)
```
Run Code Online (Sandbox Code Playgroud)
我正在尝试类似的东西`r df %>% filter(`a a` == 1) %>% select(`a a`) %>% as.numeric()`,但是我收到以下错误:
Error in base::parse(text = code, keep.source = FALSE) : <text>:2.0: unexpected end of input 1: df %>% filter( ^ Calls: <Anonymous> ... inline_exec -> withVisible …Run Code Online (Sandbox Code Playgroud)