search for: kludgework

Displaying 1 result from an estimated 1 matches for "kludgework".

2006 Jun 09
1
Idempotent apply
...(a, 2, min) iapply(a, 3, min) iapply(a, 1, range) iapply(a, 2, range) iapply(a, 3, range) I have included my code below. I'd be interested to get your feedback on: * whether you can find an edge case where it doesn't work * how I can make the subsetting code more elegant - the current kludgework of do.call seems to be suboptimal, but I couldn't figure out a better way * I was also suprised that a & b display differently in this example: a <- b <- as.array(1:3) dim(b) <- c(3,1) Any other comments are very much appreciated! Hadley iapply <- function(x, margins=1, f...