including forloebid and cpr, left_join is less error prone

This commit is contained in:
AG Damsbo 2022-08-17 13:36:31 +02:00
parent cd00ade74d
commit e95678b1e7

View File

@ -211,9 +211,8 @@ for (i in 1:length(inst_names)){
exp<-r_lup|> exp<-r_lup|>
purrr::reduce(full_join)|> purrr::reduce(full_join)|>
select(-matches("forloebid"))|>
select(record_id,everything())|> # To arrange "record_id" as first column select(record_id,everything())|> # To arrange "record_id" as first column
full_join(id_data) # Adding cpr and forloebid to the newly added left_join(id_data) # Adding cpr and forloebid to the newly added
write.csv(exp,"ddsc_dataset.csv",row.names = FALSE,na="") write.csv(exp,"ddsc_dataset.csv",row.names = FALSE,na="")