separated fisher test only and renamed logistic_outcome col

This commit is contained in:
Tanushree Tunstall 2020-11-19 17:48:08 +00:00
parent 6e999898df
commit 269918d696
2 changed files with 98 additions and 130 deletions

View file

@ -330,6 +330,12 @@ merging_cols = intersect( names(clinical_df), names(clinical_ics) )
clinical_df_ics = merge(clinical_df, clinical_ics, by = merging_cols, all = T); clinical_df_ics
colnames(clinical_df_ics)
# change colname of logistic_outcome
c1 = which(colnames(clinical_df_ics) == "logistic_outcome")
colnames(clinical_df_ics)[c1] <- "t1_resp_recoded"
if (nrow(clinical_df_ics) == nrow(clinical_df) & nrow(clinical_ics)){
cat("\nPASS: No. of rows match, nrow =", nrow(clinical_df_ics)
, "\nChecking ncols...")
@ -353,7 +359,10 @@ outfile_reg = paste0(outdir, outfile_name_reg)
cat("\nWriting clinical file for regression:", outfile_reg)
#write.csv(clinical_df_ics, file = outfile_reg)
write.csv(clinical_df_ics, file = outfile_reg)
################################################################
rm(age_bins, max_age_interval, max_in, min_in, o2_sat_bin, onset_initial_bin, tot_o2, tot_onset2ini, meta_data_cols)
rm(age_bins, max_age_interval, max_in, min_in
, o2_sat_bin, onset_initial_bin, tot_o2
, tot_onset2ini, meta_data_cols
, clinical_df)