If you have something like this in the pdata.txt file
To compare the control to the others you can try this:
pd <- read.AnnotatedDataFrame(filename="pdata.txt")
cont <- c("control_1", "sample_2", "sample_3", "sample_4", "sample_5", "sample_6", "sample_7", "sample_8",)
compare_all <- c(paste(cont[1],"-",cont[2], sep=""),
paste(cont[1],"-",cont[3], sep=""),
paste(cont[1],"-",cont[4], sep=""),
paste(cont[1],"-",cont[5], sep=""),
paste(cont[1],"-",cont[6], sep=""),
paste(cont[1],"-",cont[7], sep=""),
paste(cont[1],"-",cont[8], sep=""))
times <- as.factor(pd$Type)
design <- model.matrix(~0+times)
colnames(design) = levels(times)
contrast.matrix <- makeContrasts(contrasts = compare_all, levels=design)
Please post your experimental design