If you create a dummy variable for spets prior to merging, you can keep only those rows where this value is missing after merging. For example:
# fake data all <- data.frame(tdate=c(1, 3, 5, 7), symbol=c(2, 4, 6, 8)) spets <- data.frame(tdate=c(1, 3, 5, 2), symbol=c(2, 8, 6, 6)) # create a dummy variable for spets spets$dummy <- 1 # merge all2 <- merge(all, spets, by=c("tdate", "symbol"), all.x=TRUE) all3 <- all2[is.na(all2$dummy), ] all3 Jean [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.