A = data.frame(a = c(1:10), b = c(11:20))
B = data.frame(a = c(101:110), b = c(111:120))
C = data.frame(a = c(5:8), b = c(55:58))
L = list(list(B), list(A,C), list(B,C,A), list(B,C))
InputList = InputList = list(c(0.9,0.8),c(0.98,0.5),c(1, 1),c(1.5,1.2))
我有兩個列表L(列表矢量)和InputList(列表數據框列表)。我必須搜索列表L中向量(1,1)的位置,並返回InputList中對應的數據幀列表。例如,在上面的示例中,向量(1,1)是輸入列表的第三個元素,因此InputList(012)我不得不返回第三個列表中的數據幀列表(B,C,A)操作數據框列表和列表數據框列表
我早該換到'all.equal'。你可以用「相同」和浮動來解決問題。 – Justin