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 function that manipulates the zoo vector that was read in prior. I plan on looking into the zoo FAQ and the R manual '?'. Any help pushing me towards the right direction is much appreciated. -- View this message in context: http://r.789695.n4.nabble.com/Filter-Ceiling-for-unwanted-data-zoo-tp4447595p4447595.html Sent from the R help mailing list archive at Nabble.com.
thinking of using an "ifelse" statement, curious if there's a more elegant way of going about this -- View this message in context: http://r.789695.n4.nabble.com/Filter-Ceiling-for-unwanted-data-zoo-tp4447595p4447791.html Sent from the R help mailing list archive at Nabble.com.
On Mon, Mar 5, 2012 at 3:33 PM, knavero <knavero at gmail.com> wrote:> 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 function that manipulates the zoo > vector that was read in prior. I plan on looking into the zoo FAQ and the R > manual '?'. Any help pushing me towards the right direction is much > appreciated. >If z is a zoo object then any of the last three lines returns those rows of z for which a > 3 and b > 3: library(zoo) z <- zoo(cbind(a = 1:10, b = 10:1), as.Date("2000-01-01") + 0:9) z[ z$a > 3 & z$b > 3, ] # or with(z, z[a > 3 & b > 3, ]) # or subset(z, a > 3 & b > 3) Also, please read the last line of every message to r-help and provide examples that are reproducible/self-contained and minimal. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
Maybe Matching Threads
- question about user written function (newb question)
- read.zoo - combining two columns with date and time respectively into one index column?
- aggregating specific parts in zoo index column to perform sliding average
- Wrong output due to what I think might be a data type issue (zoo read in problem)
- Trying to merge new data set to bottom of old data set. Both are zoo objects.