I am looking for a way to bucket data in 2 dimensions using a weighting that
will linearly allocate based on the proximity of the reference value. I'm
sure the functionality probably already exists but couldn't find an example:


Example Data

Yrs,strike,value
0.75,105,100
1.25,102.5,200

Time Buckets
0.5
1
1.5
2

Strike buckets
100
110

Result
Blank,100,110
0.5,25,25
1,100,50
1.5,75,25
2,0,0

        [[alternative HTML version deleted]]

______________________________________________
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