[BioC] swaping values in a RGList object...

Richard Pearson Richard.Pearson at postgrad.manchester.ac.uk
Fri Jul 1 13:19:26 CEST 2005


Lourdes,

Try the following:

R1 <- RG$R[,1]
R2 <- RG$R[,2]
RG$R[,1] <-R2
RG$R[,2] <-R1

Regards

Richard


Quoting Lourdes Peña Castillo <lourdes.pena at gmail.com>:

> Hello Everyone,
>
> I am analyzing micro-array data using limma, and I need to swap
> intensity data between arrays  (because the samples were mislabeled) .
> Something like:
>
> R1 <- RG[,1]$R
> R2 <- RG[,2]$R
> RG[,1]$R <-R2
> RG[,2]$R <-R1
>
> But I get the message:
>
>  Error: incorrect number of subscripts on matrix
>
> I have also tried replacing the values using  a for-loop but got the 
> same error.
>
> for (i in 1:length(RG[,1]$R)) {
>  RG[,1]$R[i] <- R2[i]
> }
>
> Do you know how I can swap the values?
>
> Thanks!
>
> Lourdes
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
>



More information about the Bioconductor mailing list