perfomed LR analysis and tidyed up clinical formatting code
This commit is contained in:
parent
08e01abfb5
commit
f0c0fd72d1
5 changed files with 296 additions and 301 deletions
38
read_data.R
38
read_data.R
|
@ -66,10 +66,6 @@ if (table(fp_adults$flustat == 1)[[1]] == nrow(fp_adults) ){
|
|||
} else{
|
||||
cat ("\nFAIL: adult df number mismatch!")
|
||||
}
|
||||
|
||||
#=============================================
|
||||
# FLU positive adult patients: without asthma
|
||||
#=============================================
|
||||
#-----------------------------------
|
||||
# asthma and copd status correction
|
||||
# for conflicting field!
|
||||
|
@ -101,18 +97,21 @@ if ( table(fp_adults$ia_exac_copd, fp_adults$asthma) [[2,2]] == 0 ){
|
|||
quit()
|
||||
}
|
||||
|
||||
cat("\nExtracting flu positive without asthma")
|
||||
table(fp_adults$asthma)
|
||||
cat("\nNo. of asthmatics:", table(fp_adults$asthma)[[2]]
|
||||
, "\nNo. of non-asthmatics:", table(fp_adults$asthma)[[1]])
|
||||
str(fp_adults$asthma)
|
||||
#=============================================
|
||||
# FLU positive adult patients: without asthma
|
||||
#=============================================
|
||||
#cat("\nExtracting flu positive without asthma")
|
||||
#table(fp_adults$asthma)
|
||||
#cat("\nNo. of asthmatics:", table(fp_adults$asthma)[[2]]
|
||||
# , "\nNo. of non-asthmatics:", table(fp_adults$asthma)[[1]])
|
||||
#str(fp_adults$asthma)
|
||||
|
||||
table(fp_adults$obesity)
|
||||
table(fp_adults$obesity, fp_adults$asthma)
|
||||
#table(fp_adults$obesity)
|
||||
#table(fp_adults$obesity, fp_adults$asthma)
|
||||
|
||||
fp_adults_na = fp_adults[fp_adults$asthma == 0,]
|
||||
table(fp_adults_na$obesity)
|
||||
table(fp_adults_na$obesity, fp_adults_na$asthma)
|
||||
#fp_adults_na = fp_adults[fp_adults$asthma == 0,]
|
||||
#table(fp_adults_na$obesity)
|
||||
#table(fp_adults_na$obesity, fp_adults_na$asthma)
|
||||
|
||||
#============
|
||||
# hc
|
||||
|
@ -120,4 +119,13 @@ table(fp_adults_na$obesity, fp_adults_na$asthma)
|
|||
#hc_data<- read.csv("/home/backup/MOSAIC/MEDIATOR_Data/master_file/Mediators_for_HC.csv")
|
||||
#str(hc_data)
|
||||
#table(hc_data$Timepoint, hc_data$Sample)
|
||||
########################################################################
|
||||
########################################################################
|
||||
|
||||
# quick sanity checks
|
||||
table(adult_df$ia_exac_copd==1 & adult_df$asthma == 1) # check this is 4
|
||||
|
||||
table(fp_adults$ia_exac_copd==1 & fp_adults$asthma == 1) # check this is 3
|
||||
|
||||
# clear unnecessary variables
|
||||
rm(metadata_all)
|
||||
rm(all_df, adult_df)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue