1

我有一个小问题,但我无法弄清楚。我有 2 个使用 dplyr read.xlsx 函数生成的多个小标题列表。现在我想使用 left_join 函数和共享列的名称将每个列表的第一个元素相互合并,这意味着两个列表中的小标题共享一个名为Study File ID. Study File ID所以我想例如使用 left_join by=c( = )将每个列表的每个元素相互合并Study FIle ID。我知道如何将单个列表与 Tibble 数据框合并,但不使用 2 个列表的每个元素。希望有人可以帮助我

files_all_compounds <- list.files("~/Internship/Internship/Script/Results - Excel files/Script_map", pattern = '*CompoundsPerFile_ML*') 
input_files <-  list.files("~/Internship/Internship/Script/Results - Excel files/Script_map", pattern = '*inputfiles_ML*') 

setwd("~/Internship/Internship/Script/Results - Excel files/Script_map")

data_all_compounds <- lapply(files_all_compounds,read_xlsx)
data_input_files <- lapply(input_files,read_xlsx)

...
4

0 回答 0