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.

the highlighted values examples of want extract

use sqldf package:

library(sqldf) sqldf("select * dat id '%0'") 

or data.table package: as suggested frank

dat[id %like% "0$"] 

Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -