> Goodmorning,
>
> I am new to the list, as well as to R and Bioconductor. As I work
through
> the R manual, texts, and related book chapters; I have encountered a
problem
> trying to walk through the examples in Gentleman and Carey's chapter
> "Visualization and Annotation of Genomic Experiments". I am runing
the
> examples on a Win2000 machine under R 1.7 and Bioconductor 1.2. I
have
> downloaded the *.rda files from the Springer website into a data
directory
> on my C: drive. I load() the golubTrain.rda and golubTest.rda along
with
> the appropriate libraries--biobase, genefilter, and annotate.
Typing
> golubTrain yields the description of the R data object. The problem
I am
> encountering is with commands that involving indexing: e.g.,
> golubTrain[1:4,] or the print() command. The former returns only
the
> descrition of the R data object and the latter returns "NULL". I
must be
> missing an important step. Can some one help me?
golubTrain is an instance of a class called "exprSet". some salient
features of exprSets
1) they combine expression and phenotype data
2) they can be subscripted like matrices
3) the 'show' method is designed to avoid dumps of massive
volumes of data to the screen
4) special accessor methods are available to permit manual
exploration of the data
> golubTrain[1:4,]
Expression Set (exprSet) with
4 genes
38 samples
phenoData object with 11 variables and 38 cases
varLabels
Samples: Sample index
ALL.AML: Factor, indicating ALL ...
now admittedly the above looks like the result of mentioning
golubTrain (simpliciter) to the interpreter ... but note the
number of genes in this expression set. This shows the
convention for subscripting with this special data structure:
row subscripting selects genes.
> golubTrain[,1:4]
Expression Set (exprSet) with
7129 genes
4 samples
phenoData object with 11 variables and 4 cases
varLabels
Samples: Sample index
ALL.AML: Factor, indicating ....
column subscripting selects 'samples' or bearers of phenotype data.
it seems that your objective was to look at some expression values.
to do this, use the exprs accessor function:
> exprs(golubTrain)[1:4,1:5]
[,1] [,2] [,3] [,4] [,5]
AFFX-BioB-5_at -214 -139 -76 -135 -106
AFFX-BioB-M_at -153 -73 -49 -114 -125
AFFX-BioB-3_at -58 -1 -307 265 -76
AFFX-BioC-5_at 88 283 309 12 168
named subscripting also works:
> exprs(golubTrain)[c("AFFX-BioB-5_at", "AFFX-BioB-M_at"),]
[,1] [,2] [,3] [,4] [,5]
AFFX-BioB-5_at -214 -139 -76 -135 -106
AFFX-BioB-M_at -153 -73 -49 -114 -125
this allows you to extract expressions for specific probes if desired,
by name.
I couldn't reproduce your finding of "NULL". tell me more about
how you were using "print"