[BioC] Boxplot from dataframe...
James W. MacDonald
jmacdon at med.umich.edu
Tue Jan 10 17:35:52 CET 2006
David Ruau wrote:
>
> I found out finally how to have the names of the experiments printed on
> the x axis by using the phenoData define in the affyBatch.
> ###
> boxplot(exprs(abatch)[rownames(exprs(abatch))==id] ~ abatch$population,
> col=colors, axes=FALSE)
> title(main=y, sub=id)
> axis(1, at = 1:length(unique(da.gcrma$population)), labels =
> as.list(unique(da.gcrma$exp)))
> axis(2)
> box()
> ###
>
> David
Why don't you just use the 'names' argument to boxplot() for the x-axis
labeling? In addition, you don't need the logical vector
rownames(exprs(abatch))==id
to subset a matrix. You can simply use the rowname, which is at the very
least less typing, and may well be faster.
exprs(abatch)[id,]
Jim
--
James W. MacDonald
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623
More information about the Bioconductor
mailing list