Perhaps is a silly question, but I couldn't find a solution for this.
I want to pass the variable name using paste()
, and use the variable name to evaluate an inequality within dplyr::filter()
, but it returns 0 rows, not my expected output
I tried using eval()
and as.formula()
without success
library(dplyr)
dcl <- '07'
xdecil <- paste('detr0', dcl, sep='')
final_cust <- cd_probs %>% filter(final_prob>=xdecil)