Hi,
I think I checked all the obvious answers to this...
How do I change the title, etc. when I create an image of a single chromatogram? Using main="" did not work.
Thanks!
Alan
No it is not implemented to change the title at the moment. The ... are used to pass all additional arguments to profRange(...).
I think the easiest way is to simply copy a few lines of source code and create a function "image2" with the changes that you want, e.g.
image2 <- function(x, col = rainbow(256), main="XC/MS Log Intensity Image", ...) {
sel <- profRange(x, ...)
zlim <- log(range(x@env$intensity))
if (zlim[1] < 0) {
zlim <- log(exp(zlim)+1)
image(profMz(x)[sel$massidx], x@scantime[sel$scanidx],
log(x@env$profile[sel$massidx, sel$scanidx]+1),
col = col, zlim = zlim, main = main, xlab="m/z", ylab="Seconds")
} else
image(profMz(x)[sel$massidx], x@scantime[sel$scanidx],
log(x@env$profile[sel$massidx, sel$scanidx]),
col = col, zlim = zlim, main = main, xlab="m/z", ylab="Seconds")
}
Ralf,
thanks for the fast reply... Perfect!
In the line of teaching me to fish, instead of giving me fish....
In general, how do I get to see the code? As I understand it, the standard way is typing in functions with no parameters at the command line, but that didn't work in this case.
Thanks for the great support.
Alan
Hi,
just typing the function name does not work for object methods
in R's object orientation with S4 objects.
You can download the xcms source from bioconductor,
http://bioconductor.org/packages/2.11/b ... /xcms.html (http://bioconductor.org/packages/2.11/bioc/html/xcms.html) (Package Sources)
or view files directly in the version control system
https://hedgehog.fhcrc.org/bioconductor ... acks/xcms/ (https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/xcms/)
(user: readonly, pass: readonly).
Yours,
Steffen