Hi, If `dat` is the dataset: dat[!(dat$ID==2 & as.numeric(gsub("-.*","",dat$Month))<5),] ID Month Value 1 1 03-2014 1 2 1 04-2014 10 3 1 05-2014 50 6 2 05-2014 4 7 2 06-2014 2 A.K. hello together, i have a short question, maybe you can help me. I have a data.frame like this one ID Month Value 1 1 03-2014 1 2 1 04-2014 10 3 1 05-2014 50 4 2 03-2014 8 5 2 04-2014 7 6 2 05-2014 4 7 2 06-2014 2 I now want to create another data.frame without the lines from ID==2 which are earlier than 05-2014 The solution look like this one: ID Month Value 1 1 03-2014 1 2 1 04-2014 10 3 1 05-2014 50 4 2 05-2014 4 5 2 06-2014 2 maybe you can help me. Best regards. Mat