View source: R/clinic_getCoxPie.R
getCoxPie | R Documentation |
Get pie plot of Cox chisq proportion for variants in Cox regression model
getCoxPie(
data,
time.col = "time",
status.col = "event",
clusters,
time.raw.type = c("Day", "Month", "Year")[1],
time.target.type = c("Day", "Month", "Year")[3],
global = T,
pie.color,
Others.color = mycolor[27],
pie.label,
dc = 1,
legend.name = "Variable",
legend.position = "right",
is.title = T,
plot.size = 7,
names = "project"
)
data |
a data frame with survival data(time & event) |
time.col |
colname of time value |
status.col |
Numeric. |
clusters |
list of characters.Some of the colnames of the data representing the value involving the glm model. |
time.raw.type |
one of "Day","Month","Year" |
time.target.type |
one of "Day","Month","Year" |
global |
should a global chi-square test be done, in addition to the per-variable or per-term tests tests. |
pie.color |
a character vector with color value and variable names. Default is missing. |
Others.color |
the color of others. It works when |
dc |
the digit counts of proportion |
legend.name |
the name of legened |
legend.position |
the position of legend |
is.title |
whether plot title |
plot.size |
the size of saved plots |
names |
part of save files or plots. |
pie data and plots
Weibin Huang<654751191@qq.com>
cox.zph
; cox.ph
data("myeloma",package = "survminer");
data <- myeloma;rm(myeloma)
show.color(mycolor)
pie.color <- c(TP53="#FB8072", WHSC1="#BEBADA", DEPDC1="#80B1D3", Others="#A65628")
pie.label = c("TP53" = "tp53","WHSC1" = "whsc1","DEPDC1"="depdc1")
a <- getCoxPie(data,
time.col = "time",
status.col = "event",
clusters = list(c("TP53","WHSC1"),
c("TP53","WHSC1","DEPDC1")),
time.raw.type = c("Day", "Month","Year")[2],
time.target.type = c("Day", "Month", "Year")[3],
global=T,
pie.color = pie.color,
pie.label = pie.label,
plot.size = 7,
names = "project")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.