lmFit error - 'x' must be numeric
0
0
Entering edit mode
2.8 years ago
Tushar • 0

Can anyone help me solve this error,

#indentification of DE
ph@data[ ,2] = c("MS","MS","MS","MS","MS","MS","MS","control","control","control","control","control","control","control","control","control")
colnames(ph@data)[2]="source"
ph@data
groups = ph@data$source
f = factor(groups,levels = c("MS","control"))
design = model.matrix(~ 0 + f)
colnames(design) = c("MS","control")
data.fit = lmFit(data.matrix02,design)


#error
data.fit = lmFit(data.matrix02,design)

Error in rowMeans(y$exprs, na.rm = TRUE) : 'x' must be numeric 

The gene symbols have already been moved to the rownames.

Still this is the error I get. Data.matrix02 is a matrix with Gene symbols and the expression data.

Thank you.

Limma expression R genes • 1.8k views
ADD COMMENT
0
Entering edit mode

this is the error I get. Data.matrix02 is a matrix with Gene symbols and the expression data.

Please show a selection of it. Probably you have the genes inside the matrix rather than as rownames? The matrix must be all-numeric, genes must be rownames.

ADD REPLY
0
Entering edit mode

Thank you But, the gene symbols have already been taken outside the matrix as rownames and we still encounter the same error. How do I proceed.

ADD REPLY
0
Entering edit mode

Then the matrix is not numeric. Can you provide example data, with dput?

ADD REPLY
0
Entering edit mode

Samples are as follows DDR1 " 6.7" " 6.9" " 6.7" " 6.8" " 7.0"
MIR4640 " 6.7" " 6.9" " 6.7" " 6.8" " 7.0"
RFC2 " 6.9" " 7.0" " 7.1" " 7.2" " 6.8"
HSPA6 " 6.9" " 7.3" " 7.6" " 7.6" " 8.0"
PAX8 " 7.0" " 7.0" " 7.1" " 7.2" " 6.8"
GUCA1A " 2.5" " 2.4" " 2.4" " 2.5" " 2.6"

This is the data.matrix02.

ADD REPLY
0
Entering edit mode

Samples are as follows DDR1 " 6.7" " 6.9" " 6.7" " 6.8" " 7.0"
MIR4640 " 6.7" " 6.9" " 6.7" " 6.8" " 7.0"
RFC2 " 6.9" " 7.0" " 7.1" " 7.2" " 6.8"
HSPA6 " 6.9" " 7.3" " 7.6" " 7.6" " 8.0"
PAX8 " 7.0" " 7.0" " 7.1" " 7.2" " 6.8"
GUCA1A " 2.5" " 2.4" " 2.4" " 2.5" " 2.6"

This is the data.matrix02.

ADD REPLY

Login before adding your answer.

Traffic: 1662 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6