you are asking how to add new phenoData variables to an ExpressionSet E
if there are n samples and v is a vector of length n and you want to name
the new variable p, one approach is

pData(E)$p = v

specifically for your problem

pData(eset.irq.50)$ES = c("PUFA", "PUFA", "ST", "ST", "PUFA", "PUFA", "ST",
"ST")

would take care of one of your variables

you have to be very careful that the phenodata variable values correspond to
the
samples that you want to label.  a more secure way of handling this problem
is
to create a data frame of n rows and q columns that describe your samples
comprehensively.  the rownames of the data frame should correspond to the
sample names of the ExpressionSet data.  construct an AnnotatedDataFrame
based on the nxq data frame and then use the phenoData<- or a de novo
ExpressionSet construction to take advantage of validation that the sample
names for both expression and sample-level data are consistent.

I see that Martin Morgan has responded at an ungodly hour with a more
concise
solution, using [[ instead of $, that covers the varMetadata elements as
well.  care
has to be taken when using $ so it is a good idea to attend to his approach.

On Wed, May 27, 2009 at 8:03 AM, Alberto Goldoni <
alberto.goldoni1975@gmail.com> wrote:

> > Hello to everybody,
> > i have a little problem with my dataset. Actually my data using
> > pData(eset.irq.50) is like this:
> >
> > > eset.irq.50
> > ExpressionSet (storageMode: lockedEnvironment)
> > assayData: 1227 features, 8 samples
> >   element names: exprs
> > phenoData
> >   sampleNames: SHR-PUFA5.CEL, SHR-PUFA6.CEL, ..., WK-st2.CEL  (8 total)
> >   varLabels and varMetadata description:
> >     sample: arbitrary numbering
> > featureData
> >   featureNames: 1367555_at, 1367556_s_at, ..., 1399089_at  (1227 total)
> >   fvarLabels and fvarMetadata description: none
> > experimentData: use 'experimentData(object)'
> > Annotation: rat2302
> >
> >
> > > pData(eset.irq.50)
> >                                        sample
> > SHR-PUFA5.CEL             1
> > SHR-PUFA6.CEL             2
> > SHR-st7.CEL                   3
> > SHR-st8.CEL                   4
> > WK-PUFA3.CEL              5
> > WK-PUFA4.CEL              6
> > WK-st1.CEL                    7
> > WK-st2.CEL                    8
> >
> > i would like to modify these data in order to obtain:
> >
> > > pData(eset.irq.50)
> >                                 ES              TYPE
> > SHR-PUFA5.CEL     PUFA          SHR
> > SHR-PUFA6.CEL     PUFA          SHR
> > SHR-st7.CEL           ST               SHR
> > SHR-st8.CEL           ST               SHR
> > WK-PUFA3.CEL      PUFA           WK
> > WK-PUFA4.CEL      PUFA           WK
> > WK-st1.CEL            ST                WK
> > WK-st2.CEL            ST                WK
> >
> > in order to gave to me the possibility to perform factDesign analysis.
> >
> > Somebody can help me?
> >
> >
> > BEST REGARDS.
> >
> >
> >
> > --
> > -----------------------------------------------------
> > Dr. Alberto Goldoni
> > Bologna, Italy
> > -----------------------------------------------------
> >
>
>
>
> --
> -----------------------------------------------------
> Dr. Alberto Goldoni
> Bologna, Italy
> -----------------------------------------------------
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>



-- 
Vincent Carey, PhD
Biostatistics, Channing Lab
617 525 2265

	[[alternative HTML version deleted]]

