dataset - R subset data by id value pattern -
i trying make subset of data table (counties) consisting of rows id number ends in zero. have tried using grep , %like% these specific entire id value , not last integer value.
use sqldf
package:
library(sqldf) sqldf("select * dat id '%0'")
or data.table
package: as suggested frank
dat[id %like% "0$"]
Comments
Post a Comment