I have a variable with the same name as a column in a dataframe:
df <- data.frame(a=c(1,2,3), b=c(4,5,6)) b <- 5
I want to get the ro
You could use the get function to fetch the value of the variable from the environment.
get
df %>% filter(b == get("b")) # Note the "" around b