I have 12 columns of data in a table called df, the first column contains several thousand strings such as AA150502-01, AA150502-02, BB150502-01, BB150502-03, etc
.
I want to filter the table so that I only see the rows ending with the suffix "-01"
, how do I do this?
I so far have:
myd <- subset(df, Date_ID == 'AA150502-01')
I need to use some kind of wildcard characters for the prefix which precedes "-01"
.
Use a regular expression. For example:
or