Look at ?ifelse en ?abs, eg :
data_frame$new_column_in_dataframe <- ifelse(stage$julian_day ==
baro$julian_day & abs(stage$time -
baro$hour) <= 30,
stage$stage.cm - baro$pressure, NA )
Cheers
Joris
On Thu, Jul 1, 2010 at 10:09 PM, Jeana Lee wrote:
> Hello,
>
> I have two series, one with strea
Your question seem to me to be not precise enough for us to provide
help. Do you need help with the if() syntax? If yes I would advice you
to read some introductory R tutorial (like "introduction to R" (pdf,
freely avalable on the net)) or some descent textbook.
On quick hint for the correct s
Hello,
I have two series, one with stream stage measurements every 5 minutes, and
the other with barometric pressure measurements every hour. I want to
subtract each barometric pressure measurement from the 12 stage measurements
closest in time to it (6 stage measurements on either side of the ho
3 matches
Mail list logo