## Friday Clinic 8/14/2009 ## Tatsuki Koyama ## client jeff Kantor library(Design) ; library(chron) source('http://biostat.mc.vanderbilt.edu/twiki/pub/Main/TatsukiRcode/TatsukiRcodeTextBox.r') source('http://biostat.mc.vanderbilt.edu/twiki/pub/Main/TatsukiRcode/TatsukiRcodeTplot.r') source('http://biostat.mc.vanderbilt.edu/twiki/pub/Main/TatsukiRcode/TatsukiRcodeMisc.r') load('m.rda') names(m) <- tolower(names(m)) d <- subset(m, select=c(id,subjectid,gender,race,age,weight,height,totalbmd,bmi,bmipercentile, per.bfat,isoprostngmgcr,vo2max,triglyceriderf,hdlrf,glucoserf,bprf,sumofrfs,truncalfatkg)) par(mfrow=c(2,2)) vo2m <- expression(paste(vo[2],' max')) plot(d$isoprostngmgcr[-126], d$per.bfat[-126], las=1, xlab='isoprost',ylab='per.bfat') plot(d$isoprostngmgcr[-126], d$vo2max[-126], las=1, xlab='isoprost', ylab=expression(paste(vo[2],' max'))) plot(d$per.bfat, d$vo2max, las=1, xlab='per.bfat', ylab=vo2m) points(d$per.bfat[126],d$vo2max[126], pch=19,col=2) par(mfrow=c(2,3)) tplot(isoprostngmgcr[-126] ~ triglyceriderf[-126], data=d, show.n=T, las=1, type=c('db','bd','db'), xlab='Triglyceride RF', ylab='isoprost', jit=.01) tplot(isoprostngmgcr[-126] ~ hdlrf[-126], data=d, show.n=T, las=1, type=c('db','bd','db'), xlab='HDL RF', ylab='isoprost', jit=.01) tplot(isoprostngmgcr[-126] ~ glucoserf[-126], data=d, show.n=T, las=1, type=c('db','bd','db'), xlab='Glucose RF', ylab='isoprost', jit=.01) tplot(isoprostngmgcr[-126] ~ bprf[-126], data=d, show.n=T, las=1, type=c('db','bd','db'), xlab='BP RF', ylab='isoprost', jit=.01) tplot(isoprostngmgcr[-126] ~ sumofrfs[-126], data=d, show.n=T, las=1, type=c('bd','bd','db','db'), xlab='Sum of RF', ylab='isoprost', jit=.01) par(mfrow=c(2,3)) tplot(vo2max ~ triglyceriderf, data=d, show.n=T, las=1, type=c('db','bd','db'), xlab='Triglyceride RF', ylab=vo2m, jit=.01) tplot(vo2max ~ hdlrf, data=d, show.n=T, las=1, type=c('db','bd','db'), xlab='HDL RF', ylab=vo2m, jit=.01) tplot(vo2max ~ glucoserf, data=d, show.n=T, las=1, type=c('db','bd','db'), xlab='Glucose RF', ylab=vo2m, jit=.01) tplot(vo2max ~ bprf, data=d, show.n=T, las=1, type=c('db','bd','db'), xlab='BP RF', ylab=vo2m, jit=.01) tplot(vo2max ~ sumofrfs, data=d, show.n=T, las=1, type=c('bd','bd','db','db'), xlab='Sum of RF', ylab=vo2m, jit=.01) par(mfrow=c(2,2)) plot(d$truncalf, d$bmi, las=1, xlab='Truncal fat (kg)', ylab='bmi') plot(d$truncalf, d$bmipercentile, las=1, xlab='Truncal fat (kg)', ylab='bmi %') plot(d$vo2max, d$bmi, las=1, xlab=vo2m, ylab='bmi') plot(d$vo2max, d$bmipercentile, las=1, xlab=vo2m, ylab='bmi %')