On Mon, Mar 5, 2012 at 3:33 PM, knavero <knav...@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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to