similar to: aggregating specific parts in zoo index column to perform sliding average

Displaying 20 results from an estimated 1000 matches similar to: "aggregating specific parts in zoo index column to perform sliding average"

2009 Dec 29
1
Effect of na.omit()
I had an NA in one row of my data frame, so I called na.omit(). But I do not understand where that row disappeared to. >fri=na.omit(fri) > fri Date.Only DAY Hour Min15 Quarter Arrival.Val Arrival4 1 09/05/2008 Friday 8 33 3 32 8 2 10/24/2008 Friday 21 86 4 28 7 3 10/31/2008 Friday 8 33 4 20
2012 Mar 22
4
read.zoo - combining two columns with date and time respectively into one index column?
I have three columns in my raw data: date, time, and dry bulb temperature: http://r.789695.n4.nabble.com/file/n4495326/weathDataSDCoron.txt weathDataSDCoron.txt The date format is %Y%m%d and the time format is %H:%M. Any ideas on how to read it in such that it looks at the first two columns and then merges it into one column combining both the date and time? -- View this message in context:
2012 Mar 05
2
Filter/Ceiling for unwanted data - zoo
Here's my script: http://pastebin.com/zx3TCtXg I want to draw attention to the code block where the read in of the raw data is located. Is there a function that filters out unwanted data with respect to a ceiling limit. For example, I want to remove any value over 500 kW in the rawCool variable. Any ideas where to go with that? I figure it would be an argument within read.zoo or an external
2012 Mar 20
3
Wrong output due to what I think might be a data type issue (zoo read in problem)
Here's the small scale version of the R script: http://pastebin.com/sEYKv2Vv Here's the file that I'm reading in: http://r.789695.n4.nabble.com/file/n4487682/weatherData.txt weatherData.txt I apologize for the length of the data. I tried to cut it down to 12 lines, however, it wasn't reproducing the bad output that I wanted to show. The problem is that my whole data set
2012 Apr 04
2
Trying to merge new data set to bottom of old data set. Both are zoo objects.
Here is the data I'm working with: http://r.789695.n4.nabble.com/file/n4530888/new.txt new.txt http://r.789695.n4.nabble.com/file/n4530888/old.txt old.txt My code is here: http://pastebin.com/9jjs6Ahr I'm looking for away to simply attach the new.txt to the bottom of old.txt through R, else I'll just throw it in Excel to do some preprocessing. I've looked into using merge,
2012 May 02
5
uneven vector length issue with read.zoo?
I truncated and simplified my code and the read in data that I'm working with to isolate the issue. Here is the read in data and R script respectively: http://r.789695.n4.nabble.com/file/n4604287/test.csv test.csv http://pastebin.com/rCdaDqPm Here is the terminal/R shell output that I hope the above replicates on your screen: > source("elecLoad.r", echo = TRUE) > #Load
2012 Feb 26
2
question about user written function (newb question)
Quick newb question about R relating to the line of code below: rawCool = read.zoo("cooling.txt", FUN = as.chron, format = "%m/%d/%Y %H:%M", sep = "\t", aggregate = function(x) tail(x, 1)) I'm wondering what the specifics are for the argument where it has "aggregate = function(x) tail(x, 1)". I understand that it removes the last row of
2012 Mar 02
4
Noob question - Identity argument within aggregate function?
>aggregate(z, identity, mean) 1 2 3 4 5 1.0 3.0 5.0 6.0 7.5 > aggregate(z, mean) Error: length(time(x)) == length(by[[1]]) is not TRUE Can someone help me understand the error above and why "identity" is necessary to satisfy the error -- View this message in context:
2012 Apr 14
1
simple read in with zoo using POSIXlt
Easy question a bit. So here's my code: http://pastebin.com/F4iQPVy5 I am trying to read in a series of timestamps. However with POSIXlt as FUN in read.zoo, the output is merely two numbers and is not the output that I'm hoping for. The code above should reproduce the error. Here is code that shows what I want it to do: http://pastebin.com/GEPZ5R9B The problem though, is that it's
2012 Mar 14
1
logical test not functioning correctly on zoo series...what the hell?
Here's the raw data I'm working with (will be available temporarily): http://dl.dropbox.com/u/41922443/dataout_2471_843.csv Next, here's the code I want to impose (error that I'm seeing SHOULD reproduce on your shell when script is executed...btw using Ubuntu Linux 11.10 if that makes a difference): http://pastebin.com/LDNw8UT0 The issue specifically is the last line of code in
2007 May 15
0
sliding window approach
Dear all, I would like to know if there is any R package that uses a sliding window approach to assess statistical significance out of my data. My data is composed of DNA sequences (of variable length) that are mapped to a genome with a determined score of alignment. So, I want to see if I can find more tags in a given region of the genome as opposed to finding them by chance. In this sliding
2008 Jan 24
1
Sliding Window Time Series Analysis - hourly rainfall
I have a time series of rainfall in a dataframe. I would like to be able to aggregate this using a sliding window approach- i.e. a new 24 hourly total is calculated for each hours rainfall. I'm struggling to understand how this might be achieved - currently I've tried looping a sum function to re-calculate a new total at every stage of the loop. for (inp[[9]] in
2008 Mar 25
0
Extracting maximums from a sliding window
Dear all, I am having some problems with the folowing task and would appreciate any thoughts on the matter. I have a sliding window time series of rainfall. This is 24 hour window created from an hourly record. Every hour, a new twenty four hour total is calculated. I would like to extract the Top 50 twenty four hour totals however I have a problem. Simply ranking the sliding window time
2014 Oct 15
0
[PATCH nbdkit] streaming plugin: Add support for a sliding window
[Sorry, can't use git-send-email at the moment ...] These patches implement a sliding window for the streaming plugin[1] in nbdkit. I would like to be able to stream a filesystem from tools such as 'virt-make-fs'[2]. This is a fairly frequently requested feature. Unfortunately: (a) The patches make the code significantly more complex and therefore likely to have bugs. (b) They
2012 Mar 03
1
Sliding Window in R (solved)
Dear all, you can find below my solution for sliding a window. Please find below the code for the two alternatives and the benchmarks.     install.packages('caTools') require(caTools) do_sliding_for_a_window_duty_cycle <- function(DataToAnalyse,  windowSize) {   data<-DataToAnalyse   out <- numeric()   elements<- numeric()   if (length(data[,1]) >= windowSize){       for
2006 Jan 31
0
Sliding game screen
Hello again, Does anyone know why some FPS games tend to have the screen slide sideways occasionally, showing part of the desktop (this is a dual display system so my desktop is 2048x768). I've configured the metamode settings in xorg.conf to blank the primary monitor when the games go full screen and change the resolution -- which works fine except when the mouse movement causes the screen
2006 Feb 02
0
Sliding screen in games [again]
Okay, I've posted this twice before and if I've learned anything with Linux it's that "patience and persistence is the key". Anyway, when I play First-Person-Shooters in wine sometimes the screen will slide if I move the mouse too far to the side. Generally happens when the game hangs for a second -- trying to catch up with sound or video or when I drop the console to type
2010 Jul 07
3
use sliding window to count substrings found in large string
Hello together, I'm looking for advice on how to do some tests on strings. What I want to do is the following: (just an example, real strings/sequence are about 200-400 characters long) given set of Strings: String1 abcdefgh String2 bcdefgop use a sliding window of size x to create an vector of all subsequences of size x found in the set (order matters! ). Now create, for every string
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
2006 Jun 22
5
Sliding Gallery
I have a little image gallery application in rails enough for small galleries (20< photos). But as images increase and the user needs to scroll down the page it starts getting anoying to see all pictures... I thought pagination but then I saw this AJAX goodness http://www.apple.com/getamac/ads/ As you can see the videos scroll right/left when the arrows are pressed in a circular manner