And just as an example of this and of a reproducible example, see below.
Note the first argument in the subset function is the data.frame. The second arguement is for how you'd like to subset that data.frame. And the third argument lets you select specific columns to keep (leave it blank to select all).
ex_df <- data.frame(
c1 = c(1,2,3,4,5),
c2 = c("a", "b","c","d","e")
)
subset(ex_df, c1 < 4, select = c(c2))
#> c2
#> 1 a
#> 2 b
#> 3 c
Created on 2020-03-01 by the reprex package (v0.3.0)