search for: rollmax

Displaying 12 results from an estimated 12 matches for "rollmax".

2011 Apr 13
1
Overcoming warning in package zoo
Dear R users,I have a long program that I am trying to run--I am using RStudio as my interface with R. The pieces of the program run well individually but when I try to run everything in sequence it bogs down because of a warning after using rollmax from package zoo. Here is the warning: "In rollmax.zoo(zoo(Pmat), 7, na.pad = FALSE, align = "right") : na.pad is deprecated. Use fill." The code that generates this warning islibrary(zoo)Pmax <- as.data.frame(rollmax(zoo(Pmat), 7, na.pad = FALSE, align = "right"...
2013 Jan 28
1
incorrect import?
Dear all, I'm not getting what I'm doing wrong. The line below from my read.fsa.bin function throws an error when just loading my AFLP package and disappears when I load the zoo package as well. #the line that throws the error Index <- which(Peak == rollmax(Peak, k = 1 + 2 * floor((min(diff(SizeStandard)) * Fs - 1) / 2), fill = -Inf)) #the error Error in UseMethod("rollmax") : no applicable method for 'rollmax' applied to an object of class "c('double', 'numeric')" DESCRIPTION of the AFLP package contains...
2011 Apr 07
1
df with max function applied to 6 lags of a variable?!?
Hello everyone! I have a data frame of 136 variables with 270 observations. I would like to create a new data frame such that each element of that data frame contains the maximum value of the 6 prior lags of the initial data frame. So for example, if my original data frame, A, were A1=c(7.72, 7.94, 7.56, 7.54, 0.93, 0.59, 7.21, 8.00, 7.19, 7.57)A2=c(4.27, 3.70, 3.80, 3.67, 3.83, 3.95, 4.02, 2.06,
2008 Aug 21
1
max and min with the indexes in a zoo object (or anything else that could solve the problem)
library(zoo) library(chron) t1 <- chron("1/1/2006", "00:00:00") t2 <- chron("1/31/2006", "23:45:00") deltat <- times("00:15:00") tt <- seq(t1, t2, by = times("00:15:00")) d <- sample(33:700, 2976, replace=TRUE) sin.zoo <- zoo(d,tt) #there are ninety six reading in a day d.max <- rollapply(sin.zoo, width=96, FUN=max)
2005 Apr 28
0
update: zoo 0.9-9
...t; that contains the numeric columns as "zoo" series and the "zoo" objects created from factors converted back to "factor". o [.zoo allows now indexing using observations from the index scale (and not only observation numbers). o rapply, rollmean, rollmax, rollmedian to perform rolling analyses o extended functionality to plot.zoo type argument o when plot.zoo used with one series list(...) can be omitted from various plotting parameter arguments o print.zoo documentation fix for R 2.1.0 o yearmon and yearqtr datetime classes o h...
2008 Mar 02
1
Idioms for a timeseries operation - moving window
Hi Guys, Need your wisdom on this. Say I have a time series (in zoo format) like this > x <- zoo(11:21) > x 1 2 3 4 5 6 7 8 9 10 11 11 12 13 14 15 16 17 18 19 20 21 I want to do a "moving window sampling" of it. The result can either be a matrix or a dataframe like this my.super.moving.window(x, length=3, by=1) 11 12 13 12 13 14 13 14 15 14 15 16 .... 18 19 20
2005 Apr 28
0
update: zoo 0.9-9
...t; that contains the numeric columns as "zoo" series and the "zoo" objects created from factors converted back to "factor". o [.zoo allows now indexing using observations from the index scale (and not only observation numbers). o rapply, rollmean, rollmax, rollmedian to perform rolling analyses o extended functionality to plot.zoo type argument o when plot.zoo used with one series list(...) can be omitted from various plotting parameter arguments o print.zoo documentation fix for R 2.1.0 o yearmon and yearqtr datetime classes o h...
2011 Aug 12
2
rollapply.zoo() with na.rm=TRUE
Hi. I'm comparing output from rollapply.zoo, as produced by two versions of R and package zoo. I'm illustrating with an example from a R-help posting 'Zoo - bug ???' dated 2010-07-13. My question is not about the first version, or the questions raised in that posting, because the behaviour is as documented. I'm puzzled as to why na.rm no longer is passed to mean, i.e. why
2009 Jul 25
3
how to smooth timeseries without the lagging?
Hi all, If I use a moving average, it will smooth the choppy time series, but it will lead to lagging... How do I smooth timeseries without the lagging effect? Thanks!
2005 Apr 02
1
Survey of "moving window" statistical functions - still looking f or fast mad function
...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. apply(embed(x,k), 1, max) 3. SimpleMaxLoop(x, k) - similar to SimpleMeanLoop above 4. mywinfun(x, k, FUN=max) - see above 5. rollFun(x, k, FUN=max) - fSeries package 6. rollMax(x, k) - fSeries package 7. running(x, fun=max, width=k) - gtools package The relative speeds were: <0.01, 3, 3.4, 5.3, 7.5, 7.7, 15.3 Median over moving window can be done as follows: 1. runmed(x, k) - from stats package 2. SimpleMedLoop(x, k) - similar to SimpleMeanLoop above 3. apply(em...
2004 Oct 08
1
Survey of "moving window" statistical functions - still looking f or fast mad function
...ax of the window is =y[i-1] a = x[i-m] # point that will be removed from the window } return(y) } 2. apply(embed(x,k), 1, max) 3. SimpleMaxLoop(x, k) - similar to SimpleMeanLoop above 4. mywinfun(x, k, FUN=max) - see above 5. rollFun(x, k, FUN=max) - fSeries package 6. rollMax(x, k) - fSeries package 7. running(x, fun=max, width=k) - gtools package The relative speeds were: <0.01, 3, 3.4, 5.3, 7.5, 7.7, 15.3 Median over moving window can be done as follows: 1. runmed(x, k) - from stats package 2. SimpleMedLoop(x, k) - similar to SimpleMeanLoop above 3. apply(emb...
2010 Oct 28
4
Returning highs and lows in R
I'm having trouble returning a rolling n period highest value for a data set. For each day I want to calculate the highest value over the last 3 days. I am using the following packages: zoo, xts, quantmod and TTR. Thanks, Jason GLD.Close 2010-10-01 128.91 2010-10-04 128.46 2010-10-05 130.99 2010-10-06 131.81 2010-10-07 130.37 2010-10-08 131.66 2010-10-11