From 8fe051b6f25a12a8d5ff1e50a0c5fb136831331d Mon Sep 17 00:00:00 2001 From: Jinseob Kim Date: Sun, 20 Feb 2022 12:19:00 +0000 Subject: [PATCH] git --- code/datatable-3-CCI.R | 2 +- code/datatable-4-prevdrug.R | 5 ++--- code/github.R | 3 +++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/datatable-3-CCI.R b/code/datatable-3-CCI.R index cd70185..5893435 100644 --- a/code/datatable-3-CCI.R +++ b/code/datatable-3-CCI.R @@ -1,7 +1,7 @@ ## Calculate CCI: based previous records library(parallel) -source("code/inclusion.R") +source("code/datatable-2-inclusion.R") data.asd ## Inclusion data code.cci <- list( diff --git a/code/datatable-4-prevdrug.R b/code/datatable-4-prevdrug.R index 0acfafe..4c1a9d7 100644 --- a/code/datatable-4-prevdrug.R +++ b/code/datatable-4-prevdrug.R @@ -14,9 +14,8 @@ code.drug <- list( info.prevmed <- mclapply(code.drug, function(x){ - merge(data.cci, + merge(data.asd, m60[GNL_NM_CD %in% x][order(MDCARE_STRT_DT), .SD[1], keyby = "RN_INDI"][, .(RN_INDI, inidate = MDCARE_STRT_DT)], by = "RN_INDI", all.x = T)[, ev := as.integer(Indexdate > as.Date(as.character(inidate), format = "%Y%m%d"))][, ev := ifelse(is.na(ev), 0, ev)][]$ev }, mc.cores = 3) %>% do.call(cbind, .) -colnames(info.prevmed) <- paste0("Prev_", names(code.drug)) - +colnames(info.prevmed) <- paste0("Prev_", names(code.drug)) \ No newline at end of file diff --git a/code/github.R b/code/github.R index 1ce30ab..9a26309 100644 --- a/code/github.R +++ b/code/github.R @@ -41,6 +41,9 @@ usethis::git_sitrep() # ---------------------------------------------------------------------------- ### 6. Permanent saving +system("git config --global credential.helper manager") # Windows +system("git config --global credential.helper osxkeychain") # MacOS +system("git config --global credential.helper store") # Linux ## THAT'S IT! \ No newline at end of file