'Call and analyze 2 lists of files (file1 and file2) in r
I have 2 lists of files and I want call them simultaneously, each pair [file1(1) and file2(1),...]. But with lapply(file1,file2, FUN) is not permitted. any solutions?
with codes like this:
file1=list.files(pattern="rcp45_AU")
file2=list.files(pattern="base_AU_")
FUN = function(file1,file2) {
db<- fread(file1, header = T)
dp<- fread(file2, header = T)
...
}
#call the function
lapply(file1,file2, FUN)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
