search for: bapply

Displaying 2 results from an estimated 2 matches for "bapply".

Did you mean: apply
2004 Jul 26
5
binning a vector
Hello, I was wondering wether there's a function in R that takes two vectors (of same length) as input and computes mean values for bins (intervals) or even a sliding window over these vectros. I've several x/y data set (input/response) that I'd like plot together. Say the x-data for one data set goes from -5 to 14 with 12,000 values, then I'd like to bin the x-vector in steps of
2004 Aug 31
2
Dimension of apply(X, MARGIN, FUN) when FUN returns a matrix
Dear all, apply(X, MARGIN, FUN, ...) returns an array of dimension c(n, dim(X)[MARGIN]) when FUN returns a vector of length n > 1. Matrices and arrays are also vectors, so if FUN returns a matrix or an array, apply returns an array of dimension c(n, dim(X)[MARGIN]) as above. This is in accordance with the description of apply in the Blue Book, and also how Splus works (at least v6.0). I am