sorry Alex,
I did like below but the input file contains the same rows as my microarray dataset while I need only the rows shared between two files
> setwd("E:/Affy data Col-0 priming/detailed_results")
> mycounts <- read.table("raw_rma_normalized_expression_values.txt", sep="\t", header=TRUE)
> S <- read.table("excluding.txt", sep="", header=F)
> v1 <- c(mycounts)
> v2 <- c(S)
> intersect(v1, v2)
list()
> list()
list()
> write.table(mycounts, file = "final_list.txt", sep = "\t", col.names = TRUE, row.names = FALSE)
>