I want to get rows from data `mtcar` where `mpg` column equals to some value defined previously. Usually I would like to write this

```r
mpg <- 21
mtcars[mtcars$mpg == mpg, ]

```

But I wonder if can use `with` function.

```r
mpg <- 21
with(mtcars, mtcars[mpg == mpg, ])

```

However this code not work, and I find `R` will use the column `mpg` not the variable `mpg`. I tried `get` function like `data.table` package but still not work.

I know I can change the variable name, but is there any way to use variable which has the same name with data column's name in `with` function?