search for: runmax

Displaying 7 results from an estimated 7 matches for "runmax".

2009 Aug 11
1
runmax function only for positive numbers?
Hi All, I did a google search and could not find the answer. Thus I post this message. I found runmax only work for positive numbers. x = rep(-1,10) runmax(x,3) x = rep(0, 10) runmax(x,3) for 32-bit R, i got very small numbers: 2.121996e-314 for 64-bit R, i got NaN. Is it a bug in runmax? or should this be included in the documentation that runmax only for positive numbers? however, we do h...
2007 Feb 20
1
baseline fitters
...negative values to zero. But runquantile's computation time proves exceedingly long for my large datasets, particularly if I set the endrule parameter to 'func'. Here is what caTools author Jarek Tuszynski says about relative speeds of various running-window functions: - runmin, runmax, runmean run at O(n) - runmean(..., alg="exact") can have worst case speed of O(n^2) for some small data vectors, but average case is still close to O(n). - runquantile and runmad run at O(n*k) - runmed - related R function runs at O(n*log(k)) The obvious alternative ru...
2005 Jun 17
0
Release of new version of caMassClass package and new package caT ools
...up, is much smaller than "caMassClass" and has fewer dependencies. Other changes include: - Adding to "caMassClass" support for reading and writing mzXML data - a standard for storing proteomics MS data. - Adding more error checking to 'runmean', 'runmin', 'runmax', 'runmad' & 'runquantile' functions - Writing 3 new functions for round-off-error free sumation: 'sum.exact', 'cumsum.exact' and 'runsum.exact'. - Added option to "runmean" function to allow use of above round-off-error free computation J...
2005 Jun 17
0
Release of new version of caMassClass package and new package caT ools
...up, is much smaller than "caMassClass" and has fewer dependencies. Other changes include: - Adding to "caMassClass" support for reading and writing mzXML data - a standard for storing proteomics MS data. - Adding more error checking to 'runmean', 'runmin', 'runmax', 'runmad' & 'runquantile' functions - Writing 3 new functions for round-off-error free sumation: 'sum.exact', 'cumsum.exact' and 'runsum.exact'. - Added option to "runmean" function to allow use of above round-off-error free computation J...
2005 Apr 02
1
Survey of "moving window" statistical functions - still looking f or fast mad function
...rn arrays with length n-k+1. The relative speeds (on Windows machine) were as follow: 0.01, 0.09, 1.2, 8.1, 11.2, 13.4, 27.3, 63, 345. As one can see there are about 5 orders of magnitude between the fastest and the slowest. Maximum over moving window can be done as follow, in order of speed 1. runmax = function(x, k) { n = length(x) y = rep(0, n) m = k%/%2; a = 0; for (i in (1+m):(n-m)) { if (a==y[i-1]) y[i] = max(x[(i-m):(i+m)]) # calculate max of the window else y[i] = max(y[i-1], x[i+m]); # max of the window is =y[i-1] a = x[i-m] # point that will be removed from the window } return(y) } 2....
2004 Oct 08
1
Survey of "moving window" statistical functions - still looking f or fast mad function
...rn arrays with length n-k+1. The relative speeds (on Windows machine) were as follow: 0.01, 0.09, 1.2, 8.1, 11.2, 13.4, 27.3, 63, 345. As one can see there are about 5 orders of magnitude between the fastest and the slowest. Maximum over moving window can be done as follow, in order of speed 1. runmax = function(x, k) { n = length(x) y = rep(0, n) m = k%/%2; a = 0; for (i in (1+m):(n-m)) { if (a==y[i-1]) y[i] = max(x[(i-m):(i+m)]) # calculate max of the window else y[i] = max(y[i-1], x[i+m]); # max of the window is =y[i-1] a = x[i-m] # point...
2012 Apr 27
6
Min , Max
Hellow everyone, This code bellow will calculate average daily wind speed(measurements are taken every three hours).Any ideas how to take the Min and Max instead of average. library(Matrix) setwd("C:\\Users\\aalyaari\\Desktop\\img") listfile<-dir() long <- file("C:\\Users\\aalyaari\\Desktop\\New folder (5)\\inra.bin", "rb") A=readBin(long, integer(),