单位编码核对
library(dplyr)
gavi <- read.csv("C:\\Users\\liangxf\\Desktop\\单位信息_主表.csv",skip = 1,header = T,stringsAsFactors = F)%>%
select(name=单位名称,regionid=所在地区Id,code=单位编码)
provice <- read.csv("C:\\Users\\liangxf\\Desktop\\单位编码.csv",skip = 3,header = T,stringsAsFactors = F)%>%
select(name=全称,code=国标编码)%>%
filter(nchar(code)>6)
#GAVI系统中有,省系统中无
leftanti <- anti_join(gavi, provice,by=c("code"))
#省系统中有,GAVI系统中无
rightanti <- anti_join(provice,gavi,by=c("code"))
gavi <- read.csv("C:\\Users\\liangxf\\Desktop\\单位信息_主表.csv",skip = 1,header = T,stringsAsFactors = F)%>%
select(name=单位名称,regionid=所在地区Id,code=单位编码)
provice <- read.csv("C:\\Users\\liangxf\\Desktop\\单位编码.csv",skip = 3,header = T,stringsAsFactors = F)%>%
select(name=全称,code=国标编码)%>%
filter(nchar(code)>6)
#GAVI系统中有,省系统中无
leftanti <- anti_join(gavi, provice,by=c("code"))
#省系统中有,GAVI系统中无
rightanti <- anti_join(provice,gavi,by=c("code"))
评论
发表评论