[BioC] Accessing attributes of object
Joern Toedling
Joern.Toedling at curie.fr
Thu Jul 29 14:30:18 CEST 2010
Hi,
this is not really a Bioconductor question and should have been asked on the
more general R-help list.
Nevertheless, the answer is given on the help page of TukeyHSD. Each element
of the result list is a matrix and can be accessed accordingly.
So
tuk.dat$disease[1,1]
will return the first element of the matrix (see ?Extract) and
rownames(tuk.dat$disease[1,1])
will return its row names.
HTH,
Joern
On Thu, 29 Jul 2010 14:12:04 +0200, David martin wrote
> I have the following object (summary of tukeyHSD). How can i
> retrieve the characters "S-H" "SI-H" and "SI-S"
>
> I though that tuk.dat$disease[x,] would do it but is not, neither
> tuk.dat$disease[[x]]
>
> Can you help me ?
>
> str(tuk.dat$disease)
> num [1:3, 1:4] 25.245 -0.176 -25.421 14.653 -9.512 ...
> - attr(*, "dimnames")=List of 2
> ..$ : chr [1:3] "S-H" "SI-H" "SI-S"
> ..$ : chr [1:4] "diff" "lwr" "upr" "p adj"
>
> _______________________________________________
More information about the Bioconductor
mailing list