[BioC] no significant differences in gene expression-limma

Steve Lianoglou lianoglou.steve at gene.com
Mon Feb 24 18:39:10 CET 2014


Hi,

On Mon, Feb 24, 2014 at 7:13 AM, Sabet, Julia A <julia.sabet at tufts.edu> wrote:
> Thank you Gordon.  I looked up the R documentation for plotMDS and did the following code, using my normalized eset, and came up with the following error.  Could you or someone else tell me what I did wrong and if I am missing some code?  I am new to R and had never heard of plotMDS before...I don't really understand what dim.plot is.
> Thank you!
>
>> mds<-plotMDS(eset.dblfiltmale, top=500, labels=colnames(eset.dblfiltmale), col=NULL, cex=1, dim.plot=c(1,2), ndim=max(dim.plot), gene.selection="pairwise", xlab=paste("Dimension",dim.plot[1]), ylab=paste("Dimension",dim.plot[2]))
> Error in plotMDS.default(eset.dblfiltmale, top = 500, labels = colnames(eset.dblfiltmale),  :
>   object 'dim.plot' not found

This is failing because you have are calling a function (`dim`) on an
object (`dim.plot`) that is not defined.

A simpler example that triggers the same error is like so:

R> fn <- function(x, y) x + y
R> fn(x=1:10, y=max(x))

Operating on "undefined" arguments in a *function signature* is
different than operating on undefined objects when you *call* the
function (which is what I'm doing here).

I remember a decent tutorial on function/variable scoping in R that
called this "split-horizon" scoping, but google is only pointing me to
this:

http://blog.moertel.com/posts/2006-01-20-wondrous-oddities-rs-function-call-semantics.html

Which I don't think is the one I had in mind, but it does touch on
this subject a bit.

Anyway, your solution (for now) is to call plotMDS without
`ndim=max(dim.plot)`. In the long term, the solution would be to get a
better handle on some of R's calling semantics ;-)

Hope that helps,

-steve

-- 
Steve Lianoglou
Computational Biologist
Genentech



More information about the Bioconductor mailing list