This is a convenience function intended for use interactively. For programming it is better to use the standard subsetting functions like [, and in particular the non-standard evaluation of argument subset can have unanticipated consequences.
Else prefer dplyr::filter() and dplyr::select(), which like subset() use non-standard evaluation but have their own "tidy evel" framework to program safely with them.
?subset()
:Else prefer
dplyr::filter()
anddplyr::select()
, which likesubset()
use non-standard evaluation but have their own "tidy evel" framework to program safely with them.