This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in lmfit : row dimension of design doesn't match column dimension of data object

anyone can help to resolve this issue.

> fit = lmFit(gse28403eset,design_gse28403) 

>Error in lmFit(gse28403eset, design_gse28403) : 
  row dimension of design doesn't match column dimension of data object

> dim(gse28403eset)
[1] 20425    13

> dim(design_gse28403)
[1] 12  2

how can this error can be removed. any answer will be appreciated. thank you.

affymetrix r bioconductor microarray data

1 answer

The error message is very clear. The design has 12 rows, while the data (eset) has 13 columns. They should exactly match. You are missing either one row in design or have an extra col in data.

sir how can i adjust this. i have tried alot to resolve this issue but cann't find the solution. i am using following commands

groups = pData(phenoData(gse28403dat[[1]]))$characteristics_ch1

groups=as.character(groups)

groups[groups=="disease state: Castration-resistant prostate cancer"]="castration"

groups[groups=="disease state: Advanced prostate cancer"]="PC"

f = factor(groups, levels=c("castration","PC"))

design_gse28403 = model.matrix(~0+f)

colnames(design_gse28403) = levels(f)

cont.matrix = makeContrasts(PC-castration, levels=design_gse28403)

Log in to answer this question.