These two pictures were created by the same code. But the first picture created earlier than the second one.
The problem is NOW when I use the same code to create, only the second style can deliver.
Is there a "code" that can change the style?
And how to read the "Number of censoring" in the second style?
Is the second style ready for publishing?
### THE SAME CODE BEFORE
### THE SAME CODE NOW
Steps to reproduce the problem
Code: ##start library(survminer) library(survival) rt=read.table("DFS.txt",header=T,sep="\t",check.names=F)
rt$futime=rt$futime/365
outTab=data.frame()
for(gene in colnames(rt[,4:ncol(rt)])){ a=rt[,gene]<=median(rt[,gene]) diff=survdiff(Surv(futime, fustat) ~a,data = rt) pValue=1-pchisq(diff$chisq,df=1) outTab=rbind(outTab,cbind(gene=gene,pvalue=pValue))
fit <- survfit(Surv(futime, fustat) ~ a, data = rt) summary(fit)
if(pValue<0.05){ if(pValue<0.001){ pValue="<0.001" }else{ pValue=round(pValue,3) pValue=paste("=",pValue) } pdf(file=paste(gene,".DFS.GSE31210.survival.pdf",sep=""), height = 8, width = 5) survp <- ggsurvplot(fit,palette = c('#FF0000', '#0000FF'), title = paste("DFS of ", gene, " in GSE31210", sep=""), #subtitle = "Based on Kaplan-Meier estimator",
font.title = c(13, "bold", "darkblue"),
} } write.table(outTab,file="DFS.GSE31210.xls",sep="\t",row.names=F,quote=F) ##END
These two pictures were created by the same code. But the first picture created earlier than the second one. The problem is NOW when I use the same code to create, only the second style can deliver. Is there a "code" that can change the style? And how to read the "Number of censoring" in the second style? Is the second style ready for publishing?