Hi. Why does the second filter fail, when the first filter succeeds?
suppressMessages(library(dplyr))
x <- c(5,1,3,2,5)
y <- c(1,5,3,4,2)
data <- data.frame(x,y)
data
result <- data %>%
filter(x=="5" | y=="4")
result
x <- c("a","b","c","d","a")
y <- c("f","g","a","e",K")
data <- data.frame(x,y)
data
result <- data %>%
filter(x == "a" | y = "e")
result
Error: unexpected string constant in:
"result <- data %>%
filter(x == ""
Execution halted