[R] merge dataframes with conditions formulated as logical expressions

2006-06-14 Thread Wolfram Fischer
I have a data.frame df containing two variables: GRP: Factor VAL: num I have a data.frame dp containing: GRP: Factor MIN.VAL: num MAX.VAL: num VAL2: num with several rows per GRP where dp[i-1, MAX.VAL] dp[i, MIN.VAL] within the same GRP. I want to create df[i, VAL2] -

Re: [R] merge dataframes with conditions formulated as logical expressions

2006-06-14 Thread Adaikalavan Ramasamy
You have discontinuity between your MIN.VAL and MAX.VAL for a given group. If this is true in practise, then you may want to check and report when VAL is in the discontinuous region. Here is my solution that ignores that (and only uses MIN.VAL and completely disrespecting MAX.VAL). Not very

Re: [R] merge dataframes with conditions formulated as logical expressions

2006-06-14 Thread Wolfram Fischer
--- Reply to: --- Date:14.06.06 16:17 (+) From:Adaikalavan Ramasamy [EMAIL PROTECTED] Subject: Re: [R] merge dataframes with conditions formulated as logical expressions You have discontinuity between your MIN.VAL and MAX.VAL for a given group. If this is true in practise, then you