[BioC] Limma: setting expression values to NA

Gordon K Smyth smyth at wehi.EDU.AU
Thu Jan 29 02:58:40 MET 2004


> Dear all,
>
> I would like to do a principal components analysis of a microarray
> experiment. In order to do this, I first need to set the expression
> values of my control spots to NA, so that this analysis is not
> influenced by these spots. The problem is that I do not know how to
> achieve this. I can list my control spots by:
> RG[RG$genes [, "Status"] != "Gene",]
> I would like to set the corresponding RG$R and RG$G expression values to
> NA. I can set them to zero by: RG$R <- RG$R * (RG$genes [, "Status"] ==
> "Gene")
> but this is not what I want. If I try:
> RG$R <- RG$R * (if(RG$genes [, "Status"] == "Gene") {NA} else {1}) I get
> the warning message:
> the condition has length > 1 and only the first element will be used in:
> if (RG$genes[, "Status"] == "Gene") {  Can anybody help me out?

Wouldn't it be better to remove the control spots from your data object
entirely?  E.g.,

isGene <- RG$genes$Status =="Gene"
RGnocontrols <- RG[isGene,]

Cheers
Gordon

> Kind regards,
>
> Edo Plantinga



More information about the Bioconductor mailing list