I have data in the following format:
test1 <- data.frame(value = c('25.5 (5%); 39.65 (23%)', '28.15(5%) and 55.66 (34%) and 33.26 (14%)', '45 56.9565', '95.6666 (55%) 89.2343(90%) 51.56 (28%)'))
test2 <- data.frame(value = c('36.5', '55.658', '47.8', '51.562'))
I need to split the values in column test1 into three columns (col1, col2 and col3) and then compare and highlight the value in the column (test2) that is within +/- 0.1 of the value in one of the three columns (col1, col2 and col3) as shown in the image below.
Please suggest on how to proceed with this.
col1 col2 col3 test2
25.5 39.65 36.5
28.15 55.66 33.26 **55.658**
45 56.9565 47.8
95.6666 89.2343 51.56 **51.562**