更新时间:2023-01-22 07:47:34
我们可以使用Map
基于'indexList'的索引提取相应的list
元素
We can use Map
to extract the corresponding list
elements based on the index from 'indexList'
Map(`[`, dataList, indexList)
或使用purrr
library(purrr)
map2(dataList, indexList, `[`)