This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Hist And Boxplot An Expression Set Object?

Hi,BioStar. I face a problem when analysing microarray data. like this

hist(mydata,col=cols)
# Error in hist.default(mydata, col = cols) : 'x' must be numeric

boxplot(mydata,col=cols)

# Error in x[!xna] : object of type 'S4' is not subsettable
# In addition: Warning messages:
# 1: In is.na(x) : is.na() applied to non-(list or vector) of type 'S4'
# 2: In is.na(x) : is.na() applied to non-(list or vector) of type 'S4'

class of "mydata" is an expressionset that had been normalised.

mydata<-gcrma(predata)

The hist and boxplot commands work well when the data is not normalised.

boxplot(data.frame(exprs(mydata))) can work

but

hist(data.frame(exprs(mydata))) can not work

thanks

microarray r bioconductor visualization

1 answer

You need to learn about classes of data in R. Start with the R introduction manual.

If you type these commands in the R console:

?hist
?boxplot

you will note that the functions expect data in the form of a vector of numerical values. So passing them an expression set object is not going to work.

Log in to answer this question.