Question: Error of Groups in R
0
gravatar for 12021560-040
3.9 years ago by
12021560-04060
Pakistan
12021560-04060 wrote:
> fit = lmFit(gse50397eset, design_gse50397)

Error in lmFit(gse50397eset, design_gse50397) : 
 row dimension of design doesn't match column dimension of data object.

Can anyone please help me out of this error.

limma affy oligo bioconductor R • 1.6k views
ADD COMMENTlink modified 3.9 years ago by Biostar ♦♦ 20 • written 3.9 years ago by 12021560-04060
1

Can you check and post:

dim(gse50397eset)
dim(design_gse50397)
ADD REPLYlink written 3.9 years ago by WouterDeCoster43k
1

dim(gse50397eset) [1] 33297 89 dim(design_gse50397) [1] 77 2 I run these commands but did not find anything useful.. :(

ADD REPLYlink written 3.9 years ago by 12021560-04060
1

dim(gse50397eset) [1] 33297 89 dim(design_gse50397) [1] 77 2 I run these commands but did not find anything useful.. :(

ADD REPLYlink written 3.9 years ago by 12021560-04060
1

dim tells you the sizes of your objects. And indeed, these do not match. You should check if you properly created those objects.

ADD REPLYlink written 3.9 years ago by WouterDeCoster43k
1

which objects aren't created properly?? and how can I make them proper match?

ADD REPLYlink written 3.9 years ago by 78650
1

You should have a look at this thread: Error in R Script something rather similar is discussed there

ADD REPLYlink written 3.9 years ago by WouterDeCoster43k
1

please tell according to my script that which objects are not properly defined?

ADD REPLYlink written 3.9 years ago by 12021560-04060
1

shouldn't this be fit = lm(gse50397eset, design_gse50397)?

Then you get fit$fitted.values

ADD REPLYlink written 3.9 years ago by MAPK1.5k
1

lmFit does exist (limma)

ADD REPLYlink written 3.9 years ago by WouterDeCoster43k
1
Please help me and pinpoint the error specifically If you can I am not getting any help from the above responses.. Please help me get out of this error i will be very thankful to you.
gse50397dat = getGEO('GSE50397')
gse50397raw= getGEOSuppFiles("GSE50397")
tarfile <- grep("\\.tar$", rownames(gse50397raw), value = TRUE)
list.files("GSE50397")
untar("GSE50397/GSE50397_RAW.tar", exdir = "GSE50397/CEL")
list.files("GSE50397/CEL")
celfiles <- list.files("GSE50397/CEL", full = TRUE)
rawData <- read.celfiles(celfiles)
rawData
normData <- rma(rawData)
gse50397eset= exprs(normData)
groups = pData(phenoData(gse50397dat[[1]]))$Hba1c
groups=as.character(groups)
groups=sort(groups)
groups[c(11)]="diabetic"
groups[c(17)]="diabetic"
groups[c(25)]="diabetic"
groups[c(27)]="diabetic"
groups[c(29)]="diabetic"
groups[c(32)]="diabetic"
groups[c(35)]="diabetic"
groups[c(38)]="diabetic"
groups[c(42:43)]="diabetic"
groups[c(46)]="diabetic"
groups[c(48)]="diabetic"
groups[c(51)]="diabetic"
groups[c(53:56)]="diabetic"
groups[c(61)]="diabetic"
groups[c(65)]="diabetic"
groups[c(76:78)]="diabetic"
groups[c(82:84)]="diabetic"
groups[c(87)]="diabetic"
groups[c(13:16)]="control"
groups[c(23:24)]="control"
groups[c(30:31)]="control"
groups[c(57:60)]="control"
groups[c(62:64)]="control"
groups[c(66:75)]="control"
groups[c(80:81)]="control"
groups[c(88:89)]="control"
f = factor(groups, levels=c("control","diabetic"))
design_gse50397 = model.matrix(~0+f)
colnames(design_gse50397) = levels(f)
cont.matrix = makeContrasts(T2D-diabetic, levels=design_gse50397)
fit = lmFit(gse50397eset, design_gse50397)
Error in lmFit(gse50397eset, design_gse50397) : 
  row dimension of design doesn't match column dimension of data object
ADD REPLYlink written 3.9 years ago by 12021560-04060
1

What an absurd way of creating your trait data object, I would like to suggest you first follow a proper introduction to R before you try to do research. I'd suggest http://swirlstats.com/

ADD REPLYlink written 3.9 years ago by WouterDeCoster43k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1230 users visited in the last hour