For (i in 2:n) {
m1= list.files (a1[i],pattern = "index.")
#m1 <-as.character (M1)
#m11 <-grep ("^ cable", m1,value=t)
B1<-rbind (B1,M1)
}
SETWD ("e:/")
dir = Paste ("./input/", A1, "/", b1,sep= "") #用paste命令构建路径变量dir
n = Length (dir) #读取dir长度, which is the number of files in the folder
Merge.data1 = Read_excel (path= dir[1],col_names = T) #读入第一个文件内容 (you can not read one first, but for the sake of simplicity, omitting the time to define Data.frame, I choose to read into a file first.)
Merge.data<-merge.data1%>%select (Cust_num,cust_id,ac_num,cardhold, commissioned date, COLL, collection records, reminders style, external visit, external photos, customer signed documents)
#循环从第二个文件开始读入所有文件, and combine into the merge.data variable
#write. xlsx (merge.data, File = "E:\\output\\suoyin.xlsx", SheetName = "Testsheet", Row.names = FALSE)
Write.csv (Merge.data,file = "./output/suoyin.csv", row.names=f) #输出组合后的文件merge. csv to input file
#---------------------Count the number of indexes-----------------
For (i in 2:n) {
wm1= list.files (a1[i],pattern = "Outbound visit list.")
#m1 <-as.character (M1)
#m11 <-grep ("^ cable", m1,value=t)
Wb1<-rbind (WB1,WM1)
}
SETWD ("e:/")
Wdir = Paste ("./input/", A1, "/", wb1,sep= "") #用paste命令构建路径变量dir
WN = Length (Wdir) #读取dir长度, which is the number of files in the folder
Wmerge.data1 = Read_excel (path= wdir[1],col_names = T) #读入第一个文件内容 (you can not read one first, but for the sake of simplicity, omitting the time to define Data.frame, I choose to read into a file first.)
Wmerge.data<-wmerge.data1%>%select (serial number, customer ID, customer name, customer address, customer status statement, customer's results, collector, date)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.