59 lines
1.8 KiB
R
Executable file
59 lines
1.8 KiB
R
Executable file
#!/usr/bin/Rscript
|
|
getwd()
|
|
setwd("~/git/mosaic_2020/")
|
|
getwd()
|
|
############################################################
|
|
# TASK: boxplots at T1
|
|
# FIXME: currently not rendering, problem with NAs for stats?
|
|
############################################################
|
|
|
|
#=============
|
|
# Input
|
|
#=============
|
|
#source("data_extraction_formatting_non_asthmatics.R")
|
|
source("data_extraction_mediators.R")
|
|
|
|
#===============================
|
|
# data assignment for plots
|
|
#================================
|
|
#-----------
|
|
# npa
|
|
#-----------
|
|
wf_fp_npa = npa_wf[npa_wf$asthma == 0,]
|
|
lf_fp_npa = npa_lf[npa_lf$asthma == 0,]
|
|
lf_fp_npa$timepoint = paste0("t", lf_fp_npa$timepoint)
|
|
lf_fp_npa$timepoint = as.factor(lf_fp_npa$timepoint)
|
|
lf_fp_npa$obesity = as.factor(lf_fp_npa$obesity)
|
|
|
|
table(lf_fp_npa$mediator)
|
|
head(lf_fp_npa$value[lf_fp_npa$mediator == "vitd"])
|
|
lf_fp_npa = lf_fp_npa[!lf_fp_npa$mediator == "vitd",]
|
|
table(lf_fp_npa$mediator)
|
|
|
|
#-----------
|
|
# sam
|
|
#-----------
|
|
wf_fp_sam = sam_wf[sam_wf$asthma == 0,]
|
|
lf_fp_sam = sam_lf[sam_lf$asthma == 0,]
|
|
lf_fp_sam$timepoint = paste0("t", lf_fp_sam$timepoint)
|
|
lf_fp_sam$timepoint = as.factor(lf_fp_sam$timepoint)
|
|
lf_fp_sam$obesity = as.factor(lf_fp_sam$obesity)
|
|
|
|
table(lf_fp_sam$mediator)
|
|
head(lf_fp_sam$value[lf_fp_sam$mediator == "vitd"])
|
|
lf_fp_sam = lf_fp_sam[!lf_fp_sam$mediator == "vitd",]
|
|
table(lf_fp_sam$mediator)
|
|
|
|
#-----------
|
|
# serum
|
|
#-----------
|
|
wf_fp_serum = serum_wf[serum_wf$asthma == 0,]
|
|
lf_fp_serum = serum_lf[serum_lf$asthma == 0,]
|
|
lf_fp_serum$timepoint = paste0("t", lf_fp_serum$timepoint)
|
|
lf_fp_serum$timepoint = as.factor(lf_fp_serum$timepoint)
|
|
lf_fp_serum$obesity = as.factor(lf_fp_serum$obesity)
|
|
|
|
head(lf_fp_sam$value[lf_fp_serum$mediator == "vitd"])
|
|
########################################################################
|
|
|
|
rm(npa_lf, npa_wf, sam_lf, sam_wf, serum_lf, serum_wf)
|