如何根据间隔剪切两个数据帧并将它们合并?
数据框 1
read.table(textConnection(
" from to Lith
1 0 1.2 GRN
2 1.2 5.0 GDI
"), header=TRUE)
数据框 2
read.table(textConnection(
" from to Weath
1 0 1.1 HW
2 1.1 2.9 SW
3 2.9 5.0 HW
"), header=TRUE)
结果数据框
from to Weath Lith
1 0.0 1.1 HW GRN
2 1.1 1.2 SW GRN
3 1.2 2.9 SW GDI
4 2.9 5.0 HW GDI