**0**wrote:

Hi there,

I am trying to do a differential methylation analysis of probes in R using "days to death" as my clinical factor. I have values ranging from 9 to 3258 days and need to make contrasts between these values, but there are too many values to do this manually. Is there a automatic way to contrast a wide range of continuous values? If not, can I specify ranges (i.e. 0-500, 501-1000 days, etc.) and input this into the "makecontrasts" function (not sure how to go about doing this). Below is the code I am using.

```
outcome <- factor(targets$days_to_death)
design <- model.matrix(~0+outcome, data=targets)
colnames(design) <- c(levels(outcome))
fit <- lmFit(MVals_d2d, design)
contMatrix <- makeContrasts(**?????**,
levels=design)
fit2 <- contrasts.fit(fit, contMatrix)
fit2 <- eBayes(fit2)
summary(decideTests(fit2))
ann450kSub <- ann450k[match(rownames(mVals),ann450k$Name),
c(1:4,12:19,24:ncol(ann450k))]
DMPs <- topTable(fit2, coef=NULL, adjust.method="fdr", p.value=0.05, genelist=ann450kSub)
```

Thank you in advance.

**6.8k**• written 5 months ago by daniellemo •

**0**