Displaying 20 results from an estimated 1000 matches similar to: "Moving Averages in ggplot2"
2009 Feb 26
3
Moving Average
I am looking for some help at removing low-frequency components from a signal, through Moving Average on a sliding window.
I understand thiis is a smoothing procedure that I never done in my life before .. sigh.
I searched R archives and found "rollmean", "MovingAverages {TTR}", "SymmetricMA".
None of the above mantioned functions seems to accept the smoothing
2008 Jan 07
5
moving or running average
Hi all R users,
Can anyone please let me know how to do the moving average with R?
With regards,
Abu
_________________________________________________________________
Free games, great prizes - get gaming at Gamesbox.
2010 Jan 11
2
example() leaves console prompting to press Enter for new graphs
Env: Win XP, R 2.9.2]
It's a minor annoyance, but I find that after I run example(), the
console state of prompting to press Enter for
each new graph remains as it is under example. It's more annoying that
it seems difficult to turn this behavior
off!
In a fresh session:
> getOption("example.ask")
[1] "default"
Run an example:
> example(plot)
plot>
2005 Jun 16
3
Moving average
Good morning all!
I am attempting to superimpose a moving-average smoother onto a graph of
daily plots. These plots (in table[,2] below) span about 350 days and
looks very noisy. I'd like for this smoother to plot the average of each
group of 7 consecutive days (weekly) and show a line which joins these
series of averages. Given the definition of MA, the first and last points
will
2014 Jul 28
0
lattice, latticeExtra: Adding moving averages to double y plot
Hi lattice users,
I would like to add 5-year moving averages to my double y-plot. I have three factors needs to be plotted with moving averages in the same plot. One of these reads off y-axis 1 and two from y-axis 2. I have tried to use the rollmean function from the zoo-packages, but I fail in insering this into lattice (I am not an experienced lattice user). I want to keep the data points in
2006 Jul 20
3
How do I modify an exported function in a locked environment?
Running R.app on Mac OS X 10.4
> version
_
platform powerpc-apple-darwin8.6.0
arch powerpc
os darwin8.6.0
system powerpc, darwin8.6.0
status
major 2
minor 3.1
year 2006
2006 Jul 20
3
How do I modify an exported function in a locked environment?
Running R.app on Mac OS X 10.4
> version
_
platform powerpc-apple-darwin8.6.0
arch powerpc
os darwin8.6.0
system powerpc, darwin8.6.0
status
major 2
minor 3.1
year 2006
2012 Aug 23
0
MALDIquant
Dear list,
My name is Juan Fernandez-Tajes and I´m trying to use MALDIquant for analysing MS data from ABI 4700 series, I´ve exported a spot set to T2Dextractor in order to convert in mzXML format. I´ve imported this into R with mqReadMzXml function and have followed the suggested flowchart, however when I´m in the step for peak detections I obtained the following error:
peaks <-
2011 Mar 22
3
Accelerating the calculation of the moving average
Dear List,
I have a data frame with approximately 500000 rows that looks like this:
?Date??? time??? value
?
19.07.1956????????? 12:00:00?????????????? 4.84
19.07.1956????????? 13:00:00?????????????? 4.85
19.07.1956????????? 14:00:00?????????????? 4.89
19.07.1956????????? 15:00:00?????????????? 4.94
19.07.1956????????? 16:00:00?????????????? 4.99
19.07.1956????????? 17:00:00?????????????? 5.01
2010 Oct 21
1
gam plots and seWithMean
hello
I'm learning mgcv and would like to obtain numerical output corresponding
to plot.gam.
I can do so when seWithMean=FALSE (the default)
but only approximately when seWithMean=TRUE.
Can anyone show how to obtain the exact values?
Alternatively, can you clarify the explanation in the manual
"Note that, if seWithMean=TRUE, the confidence bands include
the uncertainty about the
2011 Jun 25
1
Moving average in a data table
Hi,
I'm trying to figure out common approach on calculating MA on a dataset
that contains column "time".
After digging around, I believe functions rollmean and rollaply should
be used.
However I don't quite understand the requirements for the underlying data.
Should it be zoo object type? Formatted in a special way?
As an example, I'm looking to get calculated
2008 Nov 27
1
par(ask=TRUE) and devAskNewPage(ask=TRUE) not working
Hi,
First, I do some calculation, then a plot. Add some lines and texts to the
plot.
Second, do some further calculation, then a plot. Add again some lines and
texts to the plot.
Third, do some further calculation, then....
Fourth, .....
After a plot is complete (means the plot itself, lines and texts) I would
like to click 'enter' to see
the next complete plot (again the plot itself,
2008 Jul 09
2
rollmean()
Hello,
I am trying to calculate a 31 day running mean in some temperature data
along ROWS. Rollmean() works great along columns, but how do I perform this
same action on my rows?
The data is a matrix of 365 columns (days of the year) by 5,000 rows
(lat/long coordinates).
I would like to perform a 31 day running mean along the 365 days.
I am new to R so any help would be greatly appreciated!
2010 Feb 17
2
array question
Hello All:
If I do have:
x = (2, 4, 5, 5, 6, 4, 5, 2, 1)
y = (9, 11.5, 12.5, 13, 14, 19, 20, 21, 22)
I wanted to find a simple function in R which calculates the averages of X
and Y for every 4 unit increase of Y. The results should look like:
x = (4, 6, 3) #where (2+ 4+ 5+ 5)/ 4 = 4 and ...
y = (12, 14, 20.5) #where (9+11.5+12.5+13)/ 4 = 12 and ...
Thanks,
Mohsen
2003 Nov 02
2
evolution mail client
Hi, I just wanted to know if anyone else is encountering error when
compiling Evolution on FreeBSD 4.8 or 4.9. I have problems compiling e-
util section of this port.
2008 Feb 13
4
rolling sum (like in Rmetrics package)
Hello, I'm new to R and would like to know how to create a vector of "rolling
sums". (I have seen the Rmetrics package and the rollMean function and I
would like to do the same thing except Sum instead of Mean.) I imagine
someone has done this, I just can't find it anywhere.
Example:
x <- somevector #where x is 'n' entries long
#what I would like to do is:
x1
2010 Jan 02
1
Question on Reduce + rollmean
Hello useRs,
I'd like to perform a moving average on the dataset, xx. I've tried
combining the functions Reduce and rollmean but it didn't work.
> r <- function(n) rollmean(n, 2) # where 2 = averaging interval
> output < - Reduce("r", x)
Error in f(init, x[[i]]) : unused argument(s) (x[[i]])
Is there anything wrong with the code in the first place?
where
2008 Jun 16
1
sizing non-vector point shapes in ggplot2
Dear all,
With normal plotting, one can size a set of points in a plot using a vector
argument to cex in the points() function. This works whether you are using
one of the standard R symbols (i.e. 19+) or some ascii symbol, such as '/'
eg:
plot(1:10, 1:10, type='n');
points(1:10, 1:10, cex = 1:10, pch = '/')
Trying to make the transition to ggplot2, I find that the
2012 Mar 03
4
Sliding a Window in R
Dear all,
I am having a vector of around 300.000 elements and I Want to slide fast a window from the first element until the last-Windowsize
what I have so far is the following for statement:
for (i in 1:(length(data[,1]) - windowSize)) {
out[i] <- mean(data[i:(i + windowSize - 1), ])
elements[i]<-length(i:(i + windowSize - 1))
}
but this of course takes ages to
2009 Dec 21
1
proposal for new axis.Date/axis.POSIXct
Hi R-devel.
I've noticed a couple of quirks in the current time/date axis
functions (axis.Date, axis.POSIXct, and the equivalents in lattice).
Looking at the code, it seems like a fairly ad-hoc approach, often
using pretty() on components of the time. This is not always ideal -
for example a one-hour interval gets cut into 10-minute chunks rather
than the more natural 15-minute chunks (since