Re: [Bioc-devel] vectorize default dist2 function in genefilter

2013-03-13 Thread James F. Reid
cost of constructing an object of size nrow(x)^3 in memory, which might again break performance. Best wishes Wolfgang Il giorno Mar 12, 2013, alle ore 4:43 PM, James F. Reid ha scritto: Dear bioc-devel, the dist2 function in genefilter defined as: dist2 <- functio

Re: [Bioc-devel] vectorize default dist2 function in genefilter

2013-03-13 Thread James F. Reid
cost of constructing an object of size nrow(x)^3 in memory, which might again break performance. Best wishes Wolfgang Il giorno Mar 12, 2013, alle ore 4:43 PM, James F. Reid ha scritto: Dear bioc-devel, the dist2 function in genefilter defined as: dist2 <- functio

[Bioc-devel] vectorize default dist2 function in genefilter

2013-03-12 Thread James F. Reid
Dear bioc-devel, the dist2 function in genefilter defined as: dist2 <- function (x, fun = function(a, b) mean(abs(a - b), na.rm = TRUE), diagonal = 0) { if (!(is.numeric(diagonal) && (length(diagonal) == 1L))) stop("'diagonal' must be a numeric scalar.") res = matrix(diagonal,