I would like to merge two data sets where the first dataset contains probabilities. The second data set contains a column indicating the number of weeks and two more columns showing a minimum and maximum range. The probability in dataset 1 should be assigned a "weeks" value from dataset 2 based on the range in which it falls. There can be more than one "weeks" value assigned to each row. For example, in row 3, there would be a "weeks" value assigned to each 0.72, 0.79, 0.84, 0.43, and 0.33. Additionally, "weeks" values are only assigned to numbers following a "." or numbers preceding "." when there are no values following ".". For instance, in row 1, a "weeks" value would only be assigned to 0.12 and in row 4 a "weeks" value would only be assigned to 0.71.
I would appreciate any assistance with this.
Thanks,
A
Dataset 1
V1 |
V2 |
V3 |
V4 |
V5 |
V6 |
0.61 |
0.29 |
. |
. |
. |
0.12 |
0.52 |
0.63 |
. |
. |
. |
0.11 |
0.72 |
0.79 |
0.84 |
0.43 |
0.33 |
. |
0.57 |
0.37 |
0.22 |
. |
0.71 |
. |
Dataset 2
Weeks |
Min |
Max |
1 |
0 |
0.3 |
2 |
0.3 |
0.6 |
3 |
0.6 |
1 |
0 Response to Merging two data sets based on ranges and assign a number
Post a Comment