(免费课程转载)R入门与临床三线表绘制

我们一直努力为大家分享科研干货。从今天起,MedGo干货课堂上线啦
(免费课程转载)R入门与临床三线表绘制
文章图片
首次分享课讲的是TCGA数据分析,探究某一因素与肿瘤临床数据之间的关系,并自动生成可以用于SCI发表的三线表,如下图所示:
(免费课程转载)R入门与临床三线表绘制
文章图片
MedGo干货课题课程链接:https://m.qlchat.com/wechat/page/channel-intro?channelId=2000004352037294&shareKey=46a3afe0e2ee408fe98e99c69dc1f3bf&sourceNo=link&userSourceId=c816d24d312c&shareSourceId=z6p4e16a29d52774&from=singlemessage
(免费课程转载)R入门与临床三线表绘制
文章图片
(免费课程转载)R入门与临床三线表绘制
文章图片
我们在千聊上的直播间为 MedGo干货课堂,由生物信息界的小红人左手柳叶刀右手小鼠标同学分享~
本期视频免费,不过需要我们发送千聊优惠券,前期会有9张优惠券直接领(不要问我为啥是9张啊,我想写999张的)需要代码和资料的话请您关注医科狗微信公众号:
回复三线表可获取本次课程的代码和课件
回复20190417获取优惠券啦

代码分享:#清除环境变量rm(list=ls()) #加载所需的包library("survival")library("survminer")library(dplyr)#设置参数options(stringsAsFactors = F)#修改工作目录setwd("C:\\Users\\czh\\Desktop\\material")#读取数据data <-read.csv("dat.csv",header = T)#删除缺失观测值data <- na.omit(data)#age单因素分析data_age<- data %>%dplyr::select(OS.Time, OS,age,ID)res.cox <- coxph(Surv(OS.Time, OS) ~ age, data = https://www.it610.com/article/data_age)summary(res.cox)#age数据提取data_age<- data_age %>%dplyr::select(age,ID)#性别统计tbl <- table(data$gender)cbind(tbl,prop.table(tbl))#gender数据提取data_gender <- datadata_gender<- data %>%dplyr::select(OS.Time, OS,gender,ID)#gender单因素分析data_gender <- subset(data_gender,gender =='FEMALE'| gender =='MALE')data_gender$gender <- ifelse(data_gender$gender == 'FEMALE','1FEMALE','0MALE')res.cox <- coxph(Surv(OS.Time, OS) ~ gender, data =https://www.it610.com/article/data_gender)summary(res.cox)#grade数据提取data_grade <- datadata_grade<- data %>%dplyr::select(OS.Time, OS,grade,ID)#grade单因素分析data_grade<- subset(data_grade ,grade=='High Grade'| grade=='Low Grade')data_grade$grade <- ifelse(data_grade$grade == 'High Grade','1High','0low')res.cox <- coxph(Surv(OS.Time, OS) ~ grade, data =https://www.it610.com/article/data_grade )summary(res.cox)#tcell数据提取data_tcell <- datadata_tcell<- data %>%dplyr::select(OS.Time, OS,Tcell,ID)#tcell单因素分析data_tcell$Tcell <- ifelse(data_tcell$Tcell < median(data_tcell[,'Tcell']),'0low','1high ')res.cox <- coxph(Surv(OS.Time, OS) ~Tcell, data = https://www.it610.com/article/data_tcell)summary(res.cox)#tcell数据提取data_tcell <- datadata_tcell<- data %>%dplyr::select(Tcell,ID)#stage数据提取data_stage <- datadata_stage<- data %>%dplyr::select(OS.Time, OS,stage,ID)#stage单因素分析data_stage <- subset(data_stage, stage=='Stage II'|stage=='Stage III'| stage=='Stage IV')res.cox <- coxph(Surv(OS.Time, OS) ~ stage, data =https://www.it610.com/article/data_stage)summary(res.cox)#多因素分析数据准备data_new <- merge(data_age,data_stage,by='ID')data_new <- merge(data_new,data_tcell,by='ID')#多因素分析res.cox <- coxph(Surv(OS.Time, OS) ~ age + stage+ Tcell , data = https://www.it610.com/article/data_new)summary(res.cox)

qrcode_for_gh_2f89822775fb_344.jpg
欢迎关注医科狗

(免费课程转载)R入门与临床三线表绘制
文章图片
【(免费课程转载)R入门与临床三线表绘制】您的生物医学科研好帮手!

    推荐阅读