?findInterval

On 5/10/07, Patnaik, Tirthankar <[EMAIL PROTECTED]> wrote:
> Hi,
>        A quick beginner's question. I have two time series, A with
> daily data, and another B with data at varying frequencies, but mostly
> annual. Both the series are sorted ascending.
>
> I need to merge these two series together in the following way: For any
> entry of A, the lookup should match with B until we find an entry of B
> that's larger than A's.
>
> For all A[i], i = 1,...,N and B[j], j=1,...M
>
> Match with B[j] where A[i] <= B[j]
>
> When A[i] > B[j], match with B[j+1] where A[i] <= B[j+1]
>
> Basically the less-frequent attributes stay true for a stock while the
> daily prices change.
>
> One example of this is the vlookup function in Excel with the TRUE
> option.
>
> So we have an implementation of this in R?
>
> TIA and best,
> -Tir
>
> ______________________________________________
> [email protected] 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.
>


-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

______________________________________________
[email protected] 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